fixed the memory corruption

Stinky Lua
This commit is contained in:
2026-02-15 21:16:03 +01:00
parent 76589e67dd
commit 85d08a0a34
4 changed files with 12 additions and 35 deletions

View File

@@ -107,7 +107,6 @@ void ne_fsState_truepath(ne_FsState *state, char truepath[NN_MAX_PATH], const ch
}
}
nn_Exit ne_fsState_handler(nn_FilesystemRequest *req) {
nn_Computer *C = req->computer;
ne_FsState *state = req->instance;
@@ -988,7 +987,7 @@ int main() {
const char *player = getenv("USER");
if(player == NULL) player = "me";
bool sandboxMem = true;
bool sandboxMem = getenv("NN_MEMSAND") != NULL;
nn_Context ctx;
nn_initContext(&ctx);
@@ -1097,7 +1096,7 @@ int main() {
}
}
DrawText(TextFormat("mem used: %.2f%%", (double)sand.used / sand.cap * 100), 10, 10, 20, WHITE);
if(sand.buf != NULL) DrawText(TextFormat("mem used: %.2f%%", (double)sand.used / sand.cap * 100), 10, 10, 20, WHITE);
EndDrawing();