From c512d302270198c7340730aca47bb3f0d47641d6 Mon Sep 17 00:00:00 2001 From: yeom Date: Wed, 15 Dec 2010 23:48:04 +0000 Subject: [PATCH] fix: lastcr idx could be larger than the value of (string.length-1). so appends remaining chars when lastcr idx is less than string.length. --- Robust/src/Util/CodePrinter.java | 58 ++++++++++++++++---------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/Robust/src/Util/CodePrinter.java b/Robust/src/Util/CodePrinter.java index 2d317a10..cafc0563 100644 --- a/Robust/src/Util/CodePrinter.java +++ b/Robust/src/Util/CodePrinter.java @@ -112,45 +112,45 @@ public class CodePrinter extends PrintWriter { } public void addString(String str) { - char[] string=str.toCharArray(); - int lastcr=0; + char[] string = str.toCharArray(); + int lastcr = 0; - for(int i=0;i