Correct error on Windows

This commit is contained in:
German 2026-03-07 14:58:16 +00:00
parent 72e6713adc
commit 9cc6dea12e

View File

@ -92,7 +92,6 @@ int ntsys_compile_asm(char* filename, char* asm_out) {
u ++; u ++;
} }
rewind(fp); rewind(fp);
FILE* ff = tmp;
size_t labels_count = 0; size_t labels_count = 0;
dword_t fsz = 0; dword_t fsz = 0;
while ((st = ntsys_get_str(st, fp)) != NULL) { while ((st = ntsys_get_str(st, fp)) != NULL) {
@ -111,11 +110,10 @@ int ntsys_compile_asm(char* filename, char* asm_out) {
return EXIT_FAILURE; return EXIT_FAILURE;
} }
} }
ff = fw;
free(st); free(st);
rewind(fp); rewind(fp);
while ((st = ntsys_get_str(st, fp)) != NULL) { while ((st = ntsys_get_str(st, fp)) != NULL) {
if (ntsys_asm_from_string(&mem_pos, st, ff, 1, labels, labels_pos, &labels_count, &fsz) != EXIT_SUCCESS) { if (ntsys_asm_from_string(&mem_pos, st, fw, 1, labels, labels_pos, &labels_count, &fsz) != EXIT_SUCCESS) {
free(st); free(st);
fclose(fp); fclose(fp);
fclose(tmp); fclose(tmp);