diff --git a/src/components/gpu.c b/src/components/gpu.c index 946be58..7ccca6b 100644 --- a/src/components/gpu.c +++ b/src/components/gpu.c @@ -140,12 +140,9 @@ void nni_gpu_set(nni_gpu *gpu, void *_, nn_component *component, nn_computer *co return; } - printf("It is to print: %s\n", s); - int current = 0; while(s[current] != 0) { int codepoint = nn_unicode_codepointAt(s, current); - printf("char rendered: %i\n", codepoint); nn_setPixel(gpu->currentScreen, x, y, nni_gpu_makePixel(gpu, s + current)); if(isVertical) { y++; diff --git a/src/emulator.c b/src/emulator.c index 2e34dd8..b8417d8 100644 --- a/src/emulator.c +++ b/src/emulator.c @@ -502,7 +502,7 @@ int main() { .read = (void *)ne_fs_read, .seek = NULL, }; - nn_addFileSystem(computer, "OpenOS", 1, &genericFS); + nn_addFileSystem(computer, "frostos", 1, &genericFS); nn_screen *s = nn_newScreen(80, 32, 16, 16, 256); nn_addKeyboard(s, "shitty keyboard"); diff --git a/src/neonucleus.h b/src/neonucleus.h index 851b513..85c489f 100644 --- a/src/neonucleus.h +++ b/src/neonucleus.h @@ -65,7 +65,7 @@ #define NN_CALL_HEAT 0.05 #define NN_CALL_COST 1 #define NN_LABEL_SIZE 128 -#define NN_INDIRECT_CALL_LATENCY 0.005 +#define NN_INDIRECT_CALL_LATENCY 0.0005 typedef struct nn_guard nn_guard; typedef atomic_size_t nn_refc; diff --git a/src/testLuaArch.c b/src/testLuaArch.c index 642e476..3674fe1 100644 --- a/src/testLuaArch.c +++ b/src/testLuaArch.c @@ -458,6 +458,18 @@ int testLuaArch_unicode_sub(lua_State *L) { if(stop < 0) stop = 0; if(start >= len) start = len - 1; if(stop >= len) stop = len - 1; + if(stop < start) { + lua_pushstring(L, ""); + return 1; + } + if(start < 0) { + lua_pushstring(L, ""); + return 1; + } + if((stop - start) >= len) { + lua_pushstring(L, ""); + return 1; + } // there is a way to do it without an allocation // however, I'm lazy unsigned int *points = nn_unicode_codepoints(s);