diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/runtime.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime.c b/src/runtime.c index 3f17894..33c9db6 100644 --- a/src/runtime.c +++ b/src/runtime.c @@ -156,7 +156,9 @@ i64 pit_dump(pit_runtime *rt, char *buf, i64 len, pit_value v, bool readable) { } pit_value pit_get_error(pit_runtime *rt) { - return rt->error; + pit_value ret = rt->error; + rt->error = PIT_NIL; + return ret; } void pit_error(pit_runtime *rt, char *format, ...) { |
