Changeset 7e0204a in tol


Ignore:
Timestamp:
Aug 18, 2009, 10:14:13 PM (17 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
380534f1
Parents:
57617ab
Message:

Fixes #726

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@1227 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/bbasic/txtalgeb.cpp

    r57617ab r7e0204a  
    15581558  }
    15591559  length_ = 0;
    1560   BChar ch  = 1;
     1560  BChar ch  = 0;
    15611561  bool untilIsLF = until=='\n';
    1562   for(;(length_<=maxChars)&&ch&&(ch!=until)&&(!is.eof()); length_++)
     1562  for(;(length_<=maxChars)&&(ch!=until)&&(!is.eof()); length_++)
    15631563  {
    15641564    is.get(ch);
     1565    if(!ch) { break; }
    15651566#   ifdef READ_CRLF_AS_LF
    15661567    if(untilIsLF && (ch == '\r')&&(!is.eof()))
    … …  
    15971598  }
    15981599  length_ = 0;
    1599   BChar ch  = 1, c;
     1600  BChar ch  = 0, c;
    16001601  bool untilIsLF = until=='\n';
    1601   for(;(length_<=maxChars)&&ch&&(ch!=until)&&(!feof(file)); length_++)
     1602  for(;(length_<=maxChars)&&(ch!=until)&&(!feof(file)); length_++)
    16021603  {
    16031604    ch = fgetc(file);
     1605    if(!ch) { break; }
    16041606#   ifdef READ_CRLF_AS_LF
    16051607    if(untilIsLF && (ch == '\r')&&(!feof(file)))
Note: See TracChangeset for help on using the changeset viewer.