Author: rmottola
Date: Mon Nov 28 17:07:19 2016
New Revision: 40240

URL: http://svn.gna.org/viewcvs/gnustep?rev=40240&view=rev
Log:
Fix off-by-one in length when checking the last character

Modified:
    apps/projectcenter/trunk/ChangeLog
    apps/projectcenter/trunk/Modules/Parsers/ProjectCenter/PCParser.m

Modified: apps/projectcenter/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/ChangeLog?rev=40240&r1=40239&r2=40240&view=diff
==============================================================================
--- apps/projectcenter/trunk/ChangeLog  (original)
+++ apps/projectcenter/trunk/ChangeLog  Mon Nov 28 17:07:19 2016
@@ -1,3 +1,8 @@
+2016-11-28 Riccardo Mottola <r...@gnu.org>
+
+       * Modules/Parsers/ProjectCenter/PCParser.m
+       Fix off-by-one in length when checking the last character.
+
 2016-11-25 Riccardo Mottola <r...@gnu.org>
 
        * Modules/Debuggers/ProjectCenter/PipeDelegate.h

Modified: apps/projectcenter/trunk/Modules/Parsers/ProjectCenter/PCParser.m
URL: 
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/Modules/Parsers/ProjectCenter/PCParser.m?rev=40240&r1=40239&r2=40240&view=diff
==============================================================================
--- apps/projectcenter/trunk/Modules/Parsers/ProjectCenter/PCParser.m   
(original)
+++ apps/projectcenter/trunk/Modules/Parsers/ProjectCenter/PCParser.m   Mon Nov 
28 17:07:19 2016
@@ -1,7 +1,7 @@
 /*
 **  CodeParser.m
 **
-**  Copyright (c) 2003-2015
+**  Copyright (c) 2003-2016
 **
 **  Author: Yen-Ju  <yjch...@hotmail.com>
 **          Riccardo Mottola <r...@gnu.org>
@@ -216,7 +216,7 @@
     }
   /* send an extra new line if the file did not terminate with such.
      Forces the parser to close pending actions */
-  if (codeType(_uchar+_length) != SpaceAndNewLineCodeType)
+  if (codeType(_uchar+(_length-1)) != SpaceAndNewLineCodeType)
     (*impSpaceAndNewLine)(_handler, selSpaceAndNewLine, 0X0A);
 }
 


_______________________________________________
Gnustep-cvs mailing list
Gnustep-cvs@gna.org
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to