]> Nishi Git Mirror - gwion.git/commitdiff
:art: clean VM casts
authorfennecdjay <fennecdjay@gmail.com>
Sun, 14 Aug 2022 18:57:44 +0000 (20:57 +0200)
committerfennecdjay <fennecdjay@gmail.com>
Sun, 14 Aug 2022 18:57:44 +0000 (20:57 +0200)
src/vm/vm.c

index d568972b5491a3a769e378091e740ebe1a31ff57..0fcd17c8028dabec52aa55efd6e52b7aa386b009 100644 (file)
@@ -83,9 +83,9 @@ ANN static inline bool find_handle(const VM_Shred shred, const Symbol effect) {
       (m_bit *)VPTR(&shred->info->frame, VLEN(&shred->info->frame) - 1);
   shredule(shred->tick->shreduler, shred, 0);
   shred->pc = pc; // VKEY(m, i);
-  const Instr instr = vector_at(&shred->code->instr, pc);
+  const Instr instr = (Instr)vector_at(&shred->code->instr, pc);
   if(!instr->m_val)
-    *(m_uint*)(shred->mem + instr->m_val2) = s_name(effect);
+    *(m_str*)(shred->mem + instr->m_val2) = s_name(effect);
 
   vector_pop(&shred->info->frame);
   vector_pop(&shred->info->frame);