|
while(i<len) { |
|
|
|
chr = *(tmp++); |
I got a crash/exception on line 223 when calling std::ostream::write(char *, size_t) with buffers of unknown size (coming from libcurl during an HTTP request). By instead iterating the buffer myself and calling libc's putchar or libstdc++'s std::ostream::operator<<(char), there was no crash/exception.
I believe this might be due to the loop check on line 221 not checking for a possible early null-termination. A possible fix would be:
libnds/source/arm9/console.c
Lines 221 to 223 in 6194b32
I got a crash/exception on line 223 when calling
std::ostream::write(char *, size_t)with buffers of unknown size (coming from libcurl during an HTTP request). By instead iterating the buffer myself and calling libc'sputcharor libstdc++'sstd::ostream::operator<<(char), there was no crash/exception.I believe this might be due to the loop check on line 221 not checking for a possible early null-termination. A possible fix would be: