[ROSAUTOTEST]

Some bug fixing.

svn path=/trunk/; revision=55621
This commit is contained in:
Kamil Hornicek 2012-02-16 00:52:20 +00:00
parent 891ac6118d
commit a7b1c97a33

View file

@ -119,10 +119,10 @@ StringOut(const string& String)
/* Try to print whole lines but obey the 512 bytes chunk size limit*/
if(NewString[curr_pos - 1] == '\n' || (curr_pos - start) == DBGPRINT_BUFSIZE)
{
if((curr_pos - start) > DBGPRINT_BUFSIZE || NewString[curr_pos - 1] != '\n')
if((curr_pos - start) >= DBGPRINT_BUFSIZE)
{
/* No newlines, print what we have and start over*/
if(NewString[curr_pos - 1] != '\n')
/* No newlines so far, or the string just fits */
if(last_newline <= start || (curr_pos - start) == DBGPRINT_BUFSIZE)
{
size = curr_pos - start;
memcpy(DbgString, NewString.c_str() + start, size);