1
0
mirror of https://github.com/janet-lang/janet synced 2026-04-27 09:11:28 +00:00

Keep dobytes' error string

The reason for failure would be more useful
than the most recently evaluated value.
This commit is contained in:
Nguyễn Gia Phong
2025-11-05 16:42:12 +09:00
parent 2a3308005d
commit 1c372fbf32

View File

@@ -122,7 +122,8 @@ int janet_dobytes(JanetTable *env, const uint8_t *bytes, int32_t len, const char
janet_loop();
if (fiber) {
janet_gcunroot(janet_wrap_fiber(fiber));
ret = fiber->last_value;
if (!errflags)
ret = fiber->last_value;
}
}
#endif