The type formatter code is effectively considering empty strings as read errors, which is wrong. The fix is very simple. We should rely on the error object and stop checking the size. I also added a test.
11 lines
224 B
C++
11 lines
224 B
C++
#include <cstdint>
|
|
|
|
const char cstring[15] = " \033\a\b\f\n\r\t\vaA09\0";
|
|
const char *empty_cstring = "";
|
|
|
|
int main() {
|
|
int use = *cstring;
|
|
void *void_empty_cstring = (void *)empty_cstring;
|
|
return use; // break here
|
|
}
|