From 2e865582f95958d8acc93934c84ba91dc96fb1a7 Mon Sep 17 00:00:00 2001 From: Steven Hickson Date: Sun, 4 Sep 2016 20:34:15 -0700 Subject: [PATCH] Add better debug statement for utf8 parsing error If someone has a lot of roms in a folder and one of the names is invalid, this will print the error to the log before failing on the assert that way they no which file is causing the problem. --- es-core/src/resources/Font.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/es-core/src/resources/Font.cpp b/es-core/src/resources/Font.cpp index 7e02249b18..43a468e8a0 100644 --- a/es-core/src/resources/Font.cpp +++ b/es-core/src/resources/Font.cpp @@ -124,7 +124,7 @@ UnicodeChar Font::readUnicodeChar(const std::string& str, size_t& cursor) else { // error, invalid utf8 string - + LOG(LogError) << "Error invalid utf8 string when parsing file: " << str.c_str(); // if this assert is tripped, the cursor is in the middle of a utf8 code point assert((c & 0xC0) != 0x80); // character is 10xxxxxx