From 73e30181c6a902e97b2b963f1431a24b062ade9d Mon Sep 17 00:00:00 2001 From: randomdude999 Date: Sun, 21 Jan 2024 07:44:33 +0200 Subject: [PATCH] handle crlf in newtest parser --- src/asar-tests/newtest.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/asar-tests/newtest.cpp b/src/asar-tests/newtest.cpp index 66242a30..a32b9e23 100644 --- a/src/asar-tests/newtest.cpp +++ b/src/asar-tests/newtest.cpp @@ -65,6 +65,8 @@ TestResult run_testcase(std::vector base_rom, Testcase& testcase) { asm_ss.ignore(3); } for(std::string line; std::getline(asm_ss, line); ) { + // remove trailing \r, artifact of windows newlines here + if(line.back() == '\r') line.erase(line.back()); if(line.substr(0, 2) == ";`") { auto words = split_spaces(line.substr(2)); for(std::string& w : words) {