forked from len0rd/rockbox
A better fix than b58b9c2.
I misunderstood the code a bit when I committed b58b9c2. The
read_char_no_whitespace() probably have to be done.
Change-Id: I024420149a04dbeed4d714795282bb7f88a8e1da
This commit is contained in:
parent
b58b9c26c9
commit
2292782839
1 changed files with 17 additions and 1 deletions
|
|
@ -1261,6 +1261,13 @@ read_comment_sgf (char *buffer, size_t buffer_size)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(read_char_no_whitespace (unhandled_fd) == 'C') ||
|
||||||
|
!(read_char_no_whitespace (unhandled_fd) == '['))
|
||||||
|
{
|
||||||
|
DEBUGF ("comment prop points to incorrect place in unhandled_fd!!\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
/* make output a string, the lazy way */
|
/* make output a string, the lazy way */
|
||||||
rb->memset (buffer, 0, buffer_size);
|
rb->memset (buffer, 0, buffer_size);
|
||||||
++bytes_read;
|
++bytes_read;
|
||||||
|
|
@ -1351,7 +1358,16 @@ write_comment_sgf (char *string)
|
||||||
|
|
||||||
start_of_write_wcs:
|
start_of_write_wcs:
|
||||||
|
|
||||||
if (!overwriting)
|
if (overwriting)
|
||||||
|
{
|
||||||
|
if (!(read_char_no_whitespace (unhandled_fd) == 'C') ||
|
||||||
|
!(read_char_no_whitespace (unhandled_fd) == '['))
|
||||||
|
{
|
||||||
|
DEBUGF ("non-comment while overwriting!!\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
start_of_comment = rb->lseek (unhandled_fd, 0, SEEK_END);
|
start_of_comment = rb->lseek (unhandled_fd, 0, SEEK_END);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue