Procházet zdrojové kódy

fixed invalid null field access name

Nicolas Cannasse před 3 roky
rodič
revize
981fb673ac
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      src/jit.c

+ 1 - 1
src/jit.c

@@ -3873,7 +3873,7 @@ int hl_jit_function( jit_ctx *ctx, hl_module *m, hl_function *f ) {
 					if( f == NULL ) ASSERT(dst->t->kind);
 					if( f == NULL ) ASSERT(dst->t->kind);
  					null_field_access = true;
  					null_field_access = true;
 					pad_before_call(ctx, HL_WSIZE);
 					pad_before_call(ctx, HL_WSIZE);
-					if( f->hashed_name < 256 )
+					if( f->hashed_name >= 0 && f->hashed_name < 256 )
 						op64(ctx,PUSH8,pconst(&p,f->hashed_name),UNUSED);
 						op64(ctx,PUSH8,pconst(&p,f->hashed_name),UNUSED);
 					else
 					else
 						op32(ctx,PUSH,pconst(&p,f->hashed_name),UNUSED);
 						op32(ctx,PUSH,pconst(&p,f->hashed_name),UNUSED);