aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/game/GameSpawn.java
diff options
context:
space:
mode:
authorHolger Zickner <[email protected]>2004-08-29 19:27:37 +0000
committerHolger Zickner <[email protected]>2004-08-29 19:27:37 +0000
commit3721d58bf33af4a83cf973590d922eadf85d71d4 (patch)
tree65df8b9f90a03645c3773c49f1fa45da5ce7c65e /src/jake2/game/GameSpawn.java
parentd2b627476c8ac56ebe5baf95211eac791605c94f (diff)
fix linebreak handling in entity strings
Diffstat (limited to 'src/jake2/game/GameSpawn.java')
-rw-r--r--src/jake2/game/GameSpawn.java17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/jake2/game/GameSpawn.java b/src/jake2/game/GameSpawn.java
index 7dc4934..c87c330 100644
--- a/src/jake2/game/GameSpawn.java
+++ b/src/jake2/game/GameSpawn.java
@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 18.11.2003 by RST.
-// $Id: GameSpawn.java,v 1.4 2004-07-23 10:07:14 hzi Exp $
+// $Id: GameSpawn.java,v 1.5 2004-08-29 19:27:37 hzi Exp $
package jake2.game;
@@ -127,20 +127,13 @@ public class GameSpawn extends GameSave {
*/
static String ED_NewString(String string) {
- //String newb, new_p;
- int i, l;
-
- l = string.length() + 1;
- //newb = gi.TagMalloc(l, TAG_LEVEL);
-
+ int l = string.length();
StringBuffer newb = new StringBuffer(l);
- for (i = 0; i < l - 1; i++) {
- char c;
-
- c = string.charAt(i);
+ for (int i = 0; i < l; i++) {
+ char c = string.charAt(i);
if (c == '\\' && i < l - 1) {
- c = string.charAt(i++);
+ c = string.charAt(++i);
if (c == 'n')
newb.append('\n');
else