projects
/
mit-scheme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6bf0989
)
Fix PC-in-builtin detection.
author
Taylor R Campbell
<campbell@mumble.net>
Thu, 7 Oct 2010 02:33:06 +0000
(
02:33
+0000)
committer
Taylor R Campbell
<campbell@mumble.net>
Thu, 7 Oct 2010 02:33:06 +0000
(
02:33
+0000)
n_builtins must be incremented if it is ever to exceed 0...
src/microcode/cmpint.c
patch
|
blob
|
history
diff --git
a/src/microcode/cmpint.c
b/src/microcode/cmpint.c
index 4c5ee4c92b91c7bc51235fbd4275bb780af10638..24b28ebe2f059dbc3ba20dba54e9c6ab3eff9196 100644
(file)
--- a/
src/microcode/cmpint.c
+++ b/
src/microcode/cmpint.c
@@
-2812,7
+2812,7
@@
declare_builtin (unsigned long builtin, const char * name)
}
else
{
- unsigned int scan =
n_builtins
;
+ unsigned int scan =
(n_builtins++)
;
while (low < scan)
{
(builtins [scan]) = (builtins [scan - 1]);
@@
-2837,6
+2837,7
@@
int
pc_to_builtin_index (unsigned long pc)
{
if (! ((builtins != 0)
+ && (n_builtins > 0)
&& (pc >= (builtins[0]))
&& (pc < (builtins [(n_builtins - 1)]))))
return (-1);