projects
/
org.ibex.classgen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ccbd3a8
)
off by one overflow check bug
author
brian
<brian@brianweb.net>
Fri, 28 May 2004 19:12:16 +0000
(19:12 +0000)
committer
brian
<brian@brianweb.net>
Fri, 28 May 2004 19:12:16 +0000
(19:12 +0000)
darcs-hash:
20040528191216
-24bed-
bb5334ec0e3a5cf54ffad1cc8cea7204949c05e5
.gz
src/org/ibex/classgen/MethodGen.java
patch
|
blob
|
history
diff --git
a/src/org/ibex/classgen/MethodGen.java
b/src/org/ibex/classgen/MethodGen.java
index
de4196b
..
36523f3
100644
(file)
--- a/
src/org/ibex/classgen/MethodGen.java
+++ b/
src/org/ibex/classgen/MethodGen.java
@@
-434,7
+434,7
@@
public class MethodGen implements CGConst {
if(iarg < -128 || iarg >= 256) throw new ClassGen.Exn("overflow of s/u1 option");
o.writeByte(iarg);
} else if(argLength == 2) {
- if(iarg < -32767 || iarg >= 65536) throw new ClassGen.Exn("overflow of s/u2 option");
+ if(iarg < -32768 || iarg >= 65536) throw new ClassGen.Exn("overflow of s/u2 option");
o.writeShort(iarg);
} else {
throw new Error("should never happen");