void Stream::Put(const char *s) { while (*s) Put(*s++); }
Exception at 0x00AB60C7 (address changes every time) in (Projectname).exe: 0xC0000005: Access violation at read at position 0x0000004.
#include <Core/Core.h> using namespace Upp; CONSOLE_APP_MAIN { Cout() << "\n-----------------------------------\n"; ReadStdIn(); }
The funny thing is, in debug everything works fine, only in optimal the program crashes immediately.
I tried to debug the optimal version in Visual Studio, the error seems to be in:
#include <Core/Core.h> using namespace Upp; CONSOLE_APP_MAIN { CoutUTF8(); // Without this line, works perfect. With this line = crash (same error as with 2014 upp sources) Cout() << "\n-----------------------------------\n"; ReadStdIn(); }
void Stream::Put(const char *s) { while (*s) { Put(*s); *s++; } }
void Put(int c) { if(ptr < wrlim) *ptr++ = c; else _Put(c); }