ソースを参照

FFI: Fix signedness of bool.

Mike Pall 13 年 前
コミット
8a1a6097be
1 ファイル変更1 行追加1 行削除
  1. 1 1
      src/lj_cparse.c

+ 1 - 1
src/lj_cparse.c

@@ -1524,8 +1524,8 @@ end_decl:
       if ((cds & ~(CDF_SCL|CDF_BOOL|CDF_INT|CDF_SIGNED|CDF_UNSIGNED)))
       if ((cds & ~(CDF_SCL|CDF_BOOL|CDF_INT|CDF_SIGNED|CDF_UNSIGNED)))
 	cp_errmsg(cp, 0, LJ_ERR_FFI_INVTYPE);
 	cp_errmsg(cp, 0, LJ_ERR_FFI_INVTYPE);
       info |= CTF_BOOL;
       info |= CTF_BOOL;
+      if (!(cds & CDF_SIGNED)) info |= CTF_UNSIGNED;
       if (!sz) {
       if (!sz) {
-	if (!(cds & CDF_SIGNED)) info |= CTF_UNSIGNED;
 	sz = 1;
 	sz = 1;
       }
       }
     } else if ((cds & CDF_FP)) {
     } else if ((cds & CDF_FP)) {