Skip to content

Commit

Permalink
Fix: Character reader pushes zero on EOF instead of refusing to work.
Browse files Browse the repository at this point in the history
  • Loading branch information
DolphyWind committed Feb 7, 2024
1 parent 5597c5f commit 0056bc5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/ArgParser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SOFTWARE.

#define ELECTRA_VERSION_MAJOR 2
#define ELECTRA_VERSION_MINOR 1
#define ELECTRA_VERSION_PATCH 1
#define ELECTRA_VERSION_PATCH 2

#include <vector>
#include <unordered_map>
Expand Down
3 changes: 2 additions & 1 deletion src/Reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ bool Reader::work(Current::Ptr current, std::vector<Current::Ptr>& currentVector
std::cin >> firstChar;
if (std::cin.eof())
{
return 0;
current->stackPtr->push(0);
return Cable::work(current, currentVector);
}

readSS << firstChar;
Expand Down

0 comments on commit 0056bc5

Please sign in to comment.