In pico8_ord (lpico8lib.c) we push the numbers on the stack with lua_pushnumber - but with long strings this can easily smash the min stack. So we should call lua_checkstack before pushing. So the code should read:
lua_checkstack(l, count);
for(int i = 0; i < count; i++) {
lua_pushnumber(l, uint8_t(s[n + i]));
}
With this extra line in there picochill no longer crashes fake-08 (the gfx don't look quite right, but that's a separate issue I will look into) - but at least it runs without a seg fault :)
In pico8_ord (lpico8lib.c) we push the numbers on the stack with lua_pushnumber - but with long strings this can easily smash the min stack. So we should call lua_checkstack before pushing. So the code should read:
lua_checkstack(l, count); for(int i = 0; i < count; i++) { lua_pushnumber(l, uint8_t(s[n + i])); }
With this extra line in there picochill no longer crashes fake-08 (the gfx don't look quite right, but that's a separate issue I will look into) - but at least it runs without a seg fault :)
(I should really start doing pulls..... :) )