Ignore:
Timestamp:
2009-09-30T10:29:12+13:00 (13 years ago)
Author:
mdewsnip
Message:

Fixed memory bug (causing crash on some Windows machines) in format_date(), found by Valgrind.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/runtime-src/src/recpt/formattools.cpp

    r19312 r20756  
    192192  text_t year = substr (datebegin, datebegin+4);
    193193  int chars_seen_so_far = 4;
     194  if (chars_seen_so_far == date.size()) return "_format:date_("+year+")";
    194195
    195196  if (date[chars_seen_so_far] == '-') ++chars_seen_so_far ;
     
    201202 
    202203  chars_seen_so_far += 2;
     204  if (chars_seen_so_far == date.size()) return "_format:date_("+year+","+month+")";
     205
    203206  if (date[chars_seen_so_far] == '-') ++chars_seen_so_far ;
    204  
    205207  if (date.size() < chars_seen_so_far+2) return "_format:date_("+year+","+month+")";
    206208
Note: See TracChangeset for help on using the changeset viewer.