This commit is contained in:
Andrea Bontempi 2015-08-09 18:10:53 +02:00
commit 66c4a09c6f

View file

@ -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();