From bc786ae0150dae754e95261505a24afc80e332da Mon Sep 17 00:00:00 2001 From: Thomas Arp Date: Sat, 26 Nov 2016 14:16:48 +0100 Subject: [PATCH] Fixed off-by-one bug in loop, illogical negation. - thanks for the bug report, Halenbane. --- src/dg_olc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dg_olc.c b/src/dg_olc.c index b0e2cba..fb797a4 100644 --- a/src/dg_olc.c +++ b/src/dg_olc.c @@ -455,12 +455,12 @@ void script_syntax_highlighting(struct descriptor_data *d, char *string) // Highlight lines if (!comment) { // Syntax replacement - for (i=0;i <= SYNTAX_TERMS;i++) { + for (i=0;i < SYNTAX_TERMS;i++) { line = str_replace(line, syntax_color_replacement[i][0], syntax_color_replacement[i][1]); } // Commands replacement - for (i=0;i <= COMMAND_TERMS;i++) { + for (i=0;i < COMMAND_TERMS;i++) { line = str_replace(line, command_color_replacement[i][0], command_color_replacement[i][1]); }