ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-3.0/src/utils/StreamTokenizer.cpp
(Generate patch)

Comparing:
trunk/OOPSE-3.0/src/utils/StreamTokenizer.cpp (file contents), Revision 1490 by gezelter, Fri Sep 24 04:16:43 2004 UTC vs.
branches/new_design/OOPSE-3.0/src/utils/StreamTokenizer.cpp (file contents), Revision 1737 by tim, Fri Nov 12 22:44:03 2004 UTC

# Line 4 | Line 4
4   // Available at www.BruceEckel.com.
5   //{-g++295}
6  
7 < #include "StreamTokenizer.hpp"
7 > #include "utils/StreamTokenizer.hpp"
8   using namespace std;
9  
10   string StreamTokenizer::next() {
# Line 14 | Line 14 | string StreamTokenizer::next() {
14        ii(result, result.begin());
15      while(isDelimiter(*p) && p != end)
16        p++;
17 <    while (!isDelimiter(*p) && p != end)
17 >
18 >    // There is a bug here, if p is equal to end at this point, dereference it is a undefine behavior
19 >    //while (!isDelimiter(*p) && p != end)
20 >    while (p != end && !isDelimiter(*p))
21        *ii++ = *p++;
22    }
23    return result;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines