Fix MString::fromHex() silently swallowing the odd-length-input error

The Exception on the odd-length-input path was constructed but never
thrown (missing throw keyword) - the temporary was destroyed with no
effect, so execution fell through to an out-of-bounds nextChar() read
past the exhausted buffer instead of raising an error. Added the
missing throw.

Verified via full local compile: MString.cpp builds clean standalone;
a full-repo pass shows only the pre-existing, already-known
StreamReader.h-missing failures (7 files, unrelated to this change),
confirmed via each error log individually.
This commit is contained in:
Brad Arant committed 2026-08-22 19:52:35 -07:00
1 parent ba85c5f2e5
commit 29c9a5b855
1 file changed
+1 -1
+1 -1
View File
@@ -390,7 +390,7 @@ namespace coreutils {
ch1 <<= 4;
ch1 &= 240;
if(eod())
coreutils::Exception("conversion from hex requires even number of characters.");
throw coreutils::Exception("conversion from hex requires even number of characters.");
char ch2 = nextChar();
ch2 -= 48;
if(ch2 > 9)