Fixup allocation size for bytes literals

This commit is contained in:
K. Lange 2022-05-21 20:39:47 +09:00
parent 953e57fa0d
commit 27278cfa68

View File

@ -2581,6 +2581,7 @@ static void string(int exprType) {
goto _cleanupError;
}
if (isBytes) {
stringBytes = krk_reallocate(stringBytes, stringCapacity, stringLength);
KrkBytes * bytes = krk_newBytes(0,NULL);
bytes->bytes = (uint8_t*)stringBytes;
bytes->length = stringLength;