FIX
This commit is contained in:
parent
fb99662ae8
commit
ad34cec432
1 changed files with 4 additions and 4 deletions
|
@ -15,7 +15,10 @@ RamInstruction::RamInstruction(std::string filename) {
|
|||
std::string line;
|
||||
|
||||
while (std::getline(source_file, line)) {
|
||||
|
||||
|
||||
// Increment line number
|
||||
this->lineNumber++;
|
||||
|
||||
// Remove all char after #
|
||||
line = line.substr(0, line.find('#'));
|
||||
|
||||
|
@ -45,7 +48,6 @@ RamInstruction::RamInstruction(std::string filename) {
|
|||
|
||||
// Skip if empty line
|
||||
if(line.empty()) {
|
||||
this->lineNumber++;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -64,8 +66,6 @@ RamInstruction::RamInstruction(std::string filename) {
|
|||
|
||||
this->code.push_back(instruction);
|
||||
|
||||
this->lineNumber++;
|
||||
|
||||
}
|
||||
|
||||
source_file.close();
|
||||
|
|
Loading…
Reference in a new issue