"jal" command fixes
This commit is contained in:
@@ -59,3 +59,15 @@ void Manager::init(const std::string &program_path) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
std::streampos Manager::getNextStreamLineOffset() {
|
||||
/// Speichert das aktuelle stream offset
|
||||
const auto positionBefore = m_programFile.tellg();
|
||||
/// Geht eine Zeile nach vorne zum nächsten Befehl (PC+4) und speichert den offset
|
||||
std::string line;
|
||||
std::getline(m_programFile, line);
|
||||
const auto positionAfter = m_programFile.tellg();
|
||||
/// Geht zum offset vom Anfang zurück und gibt die nächste Adresse (PC+4) zurück
|
||||
m_programFile.seekg(positionBefore);
|
||||
return positionAfter;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user