projects
/
vvhitespace
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added test for all stdio.pvvs subroutines.
[vvhitespace]
/
vv_interpreter.c
diff --git
a/vv_interpreter.c
b/vv_interpreter.c
index
5ec36eb
..
b548a50
100644
(file)
--- a/
vv_interpreter.c
+++ b/
vv_interpreter.c
@@
-253,7
+253,7
@@
process_imp_arithmetic(uint8_t * code, size_t * pc, int64_t ** sp)
case '\t':
/* Modulo */
temp = stack_pop(sp);
case '\t':
/* Modulo */
temp = stack_pop(sp);
- stack_push(sp,
stack_pop(sp)%temp
);
+ stack_push(sp,
llabs(stack_pop(sp) % llabs(temp))
);
break;
default: ws_die(pc, "malformed arithmetic IMP"); break;
}
break;
default: ws_die(pc, "malformed arithmetic IMP"); break;
}