STATUS_STACK_BUFFER_OVERRUN

I'm using an altered version of the MSoft Port chat, i'm reading 3032 bytes from the serial port. The code exits suddenly when i do the Console::ReadLine() for the second pass with the Stack Buffer error. My code worked fine when i only read in 246 bytes, and i can't seem to fathom a work around.

while (_continue)
{
message = Console::ReadLine(); // read console input

if(stringComparer->Equals("quit", message)) // tesy message
{
_continue = false; // set to break if 'quit'
}
else
{
if(stringComparer->Equals("y",message))
{
_serialPortRX->Write(intArray,0,1); // send 255 to tx on port

for(x =0;x<1008;x++) // read 1008 times and put in array
{
DataArray[x].Hours = _serialPortRX->ReadByte();
DataArray[x].AdresH = _serialPortRX->ReadByte();
DataArray[x].AdresL = _serialPortRX->ReadByte();
}
Topic archived. No new replies allowed.