Changeset 20762


Ignore:
Timestamp:
2009-09-30T11:54:21+13:00 (13 years ago)
Author:
mdewsnip
Message:

Fixed memory bugs (causing crashes on some Windows machines) in findword(), identified by Valgrind.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/common-src/src/lib/text_t.cpp

    r18880 r20762  
    386386      text_t::const_iterator char_match = first;
    387387      text_t::const_iterator word_here = word_begin;
    388       while (word_here!=word_end)
     388      while (word_here != word_end && char_match != last)
    389389    {
    390390      if (*char_match != *word_here)
     
    415415      text_t::iterator char_match = first;
    416416      text_t::const_iterator word_here = word_begin;
    417       while (word_here!=word_end)
     417      while (word_here != word_end && char_match != last)
    418418    {
    419419      if (*char_match != *word_here)
Note: See TracChangeset for help on using the changeset viewer.