Browse Source

Add parentesis to make clear the evaluation order

mingodad 9 years ago
parent
commit
74d8bad05e
1 changed files with 2 additions and 2 deletions
  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);
     int top = sq_gettop(v);
 //    printf("ffibuf %p top %d\n", ffibuf, top);
 //    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");
         return sq_throwerror(v, "Wrong number of args");
 
 
     SQInteger values[top - EXTRA_PARAMS];
     SQInteger values[top - EXTRA_PARAMS];
@@ -390,7 +390,7 @@ SQRESULT sqext_register_ffi(HSQUIRRELVM v)
         sq_pushuserpointer(v, e->type);
         sq_pushuserpointer(v, e->type);
         sq_newslot(v, -3, SQFalse);
         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);
     sq_create_delegate_table(v, sq_lib_methods, &lib_method_table);