diff options
| author | LLLL Colonq <llll@colonq> | 2026-05-15 20:11:51 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2026-05-15 20:11:51 -0400 |
| commit | 48ab2cb8e3de88dbd0722337bd4617ad22de1a12 (patch) | |
| tree | 14f7aa2afcdd28463115948ab186be60839053d2 /src | |
| parent | 2e42e30b6df2b744c45f82d2028a627b3aca7d3d (diff) | |
Clear error on get_error
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, ...) { |
