Browse Source

Fix a small bug in the Buffer

remotes/origin/master
Skia 6 years ago
parent
commit
152b5c6e08
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      Buffer/src/Buffer.cpp
  2. +1
    -1
      testfiles/Scanner/testFile

+ 2
- 2
Buffer/src/Buffer.cpp View File

@@ -51,8 +51,8 @@ Buffer::~Buffer() {

char Buffer::getChar() {
char c = 0;
f.get(c);
if (c != '\0') {
if (!f.eof()) {
f.get(c);
if (c == '\n') {
col = 1;
row++;


+ 1
- 1
testfiles/Scanner/testFile View File

@@ -8,4 +8,4 @@ plop
trolczvzeef ==qda&é&e// /* */while
42 //if (lol == fake)
if (lol =!= -666) {}
abc; def

Loading…
Cancel
Save