|
Message
From: cvs at opencores.org<cvs@o...>
Date: Fri Nov 25 10:36:43 CET 2005
Subject: [cvs-checkins] MODIFIED: jop ...
Date: 00/05/11 25:10:36 Modified: jop/java/target/src/common/util Dbg.java Log: Rasmus: print Interger.MIN correct Revision Changes Path 1.2 jop/java/target/src/common/util/Dbg.java http://www.opencores.org/cvsweb.shtml/jop/java/target/src/common/util/Dbg.java.diff?r1=1.1&r2=1.2 (In the diff below, changes in quantity of whitespace are not shown.) Index: Dbg.java =================================================================== RCS file: /cvsroot/martin/jop/java/target/src/common/util/Dbg.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- Dbg.java 11 May 2005 16:31:15 -0000 1.1 +++ Dbg.java 25 Nov 2005 09:36:42 -0000 1.2 @@ -81,17 +81,20 @@ public static void intVal(int val) { int i; + int sign = 1; if (val<0) { wr('-'); - val = -val; + //val = -val; + sign = -1; } for (i=0; i<MAX_TMP-1; ++i) { - tmp[i] = (val%10)+'0'; + //tmp[i] = (val%10)+'0'; + tmp[i] = ((val%10)*sign)+'0'; val /= 10; if (val==0) break; } for (val=i; val>=0; --val) { - wr(tmp[val]); + wr((char) tmp[val]); } wr(' '); }
|