Explorar o código

Fix x64 PE object emitter.

Mike Pall %!s(int64=16) %!d(string=hai) anos
pai
achega
ece20f8ca2
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/buildvm_peobj.c

+ 1 - 1
src/buildvm_peobj.c

@@ -359,7 +359,7 @@ void emit_peobj(BuildCtx *ctx)
 	  sprintf(name, PEOBJ_SYMF_PREFIX LABEL_PREFIX "%s", sym);
 #else
 	  sprintf(name, LABEL_PREFIX "%s", sym);
-	  name[p+sizeof(LABEL_PREFIX)] = '\0';
+	  name[(p-sym)+sizeof(LABEL_PREFIX)] = '\0';
 #endif
 	} else {
 	  sprintf(name, PEOBJ_SYM_PREFIX LABEL_PREFIX "%s", sym);