1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-26 17:46:14 +01:00

Memory Issues

This commit is contained in:
Asbelos 2022-11-19 12:50:11 +00:00
parent 61e0de1080
commit 306f91b322
2 changed files with 1 additions and 6 deletions

View File

@ -189,11 +189,6 @@ bool RingStream::commit() {
_mark++; _mark++;
if (_mark==_len) _mark=0; if (_mark==_len) _mark=0;
_buffer[_mark]=lowByte(_count); _buffer[_mark]=lowByte(_count);
{ char s[_count+2];
strncpy(s, (const char*)&(_buffer[_mark+1]), _count);
s[_count]=0;
//DIAG(F("RS commit count=%d core %d \"%s\""), _count, xPortGetCoreID(), s);
}
_ringClient = NO_CLIENT; _ringClient = NO_CLIENT;
return true; // commit worked return true; // commit worked
} }

View File

@ -32,7 +32,7 @@ class StringBuffer : public Print {
private: private:
static const int buffer_max=64; // enough for long text msgs to throttles static const int buffer_max=64; // enough for long text msgs to throttles
int16_t _pos_write; int16_t _pos_write;
char _buffer[buffer_max+1]; char _buffer[buffer_max+2];
}; };
#endif #endif