Просмотр исходного кода

Add parentesis to make clear the evaluation order

mingodad 9 лет назад
Родитель
Сommit
74d8bad05e
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      SquiLu-ext/sq_ffi.cpp

+ 2 - 2
SquiLu-ext/sq_ffi.cpp

@@ -225,7 +225,7 @@ static SQInteger sq_func__call(HSQUIRRELVM v)
     int top = sq_gettop(v);
 //    printf("ffibuf %p top %d\n", ffibuf, top);
 
-    if (ffibuf->cif.nargs != top - EXTRA_PARAMS)
+    if (ffibuf->cif.nargs != (top - EXTRA_PARAMS))
         return sq_throwerror(v, "Wrong number of args");
 
     SQInteger values[top - EXTRA_PARAMS];
@@ -390,7 +390,7 @@ SQRESULT sqext_register_ffi(HSQUIRRELVM v)
         sq_pushuserpointer(v, e->type);
         sq_newslot(v, -3, SQFalse);
     }
-    sq_newslot(v,-3,SQTrue); //add ffi table to the root table
+    sq_newslot(v,-3,SQTrue); //add ffi table to the root table
 
 
     sq_create_delegate_table(v, sq_lib_methods, &lib_method_table);