PennMUSH Community

Changeset 1161

Show
Ignore:
Timestamp:
11/22/07 18:07:52 (1 year ago)
Author:
shawnw
Message:

Fixed array underflow buglet

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 1.8.2/trunk/CHANGES.182

    r1126 r1161  
    2222 * width() and height() do not return 0 when set to invalid input. 
    2323   By Talvo. 
     24 * Array underflow bug found by running under Valgrind. 
    2425 
    2526Version 1.8.2 patchlevel 7                     October 6, 2007 
  • 1.8.2/trunk/src/strutil.c

    r1027 r1161  
    993993  for (p = str; *p; p++) ; 
    994994  /* And trailing */ 
    995   for (p--; (*p == ' ') && (p > str); p--) ; 
     995  for (p--; p > str && *p == ' '; p--) ; 
    996996  p++; 
    997997  *p = '\0';