Skip to content

Commit 1db8e4a

Browse files
committed
Sync up mmd changes/fixes.
1 parent 13ad098 commit 1db8e4a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

htmldoc/mmd.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ typedef struct _mmd_filebuf_s // Buffered file
9292
{
9393
mmd_iocb_t cb; // Read callback function
9494
void *cbdata; // Read callback data
95-
char buffer[8192], // Buffer
95+
char buffer[65536], // Buffer
9696
*bufptr, // Pointer into buffer
9797
*bufend; // End of buffer
9898
} _mmd_filebuf_t;
@@ -179,6 +179,8 @@ mmdCopyAllText(mmd_t *node) // I - Parent node
179179
if (current->text)
180180
{
181181
// Append this node's text to the string...
182+
long alloff = allptr - all; // Offset within current buffer
183+
182184
textlen = strlen(current->text);
183185
allsize += textlen + (size_t)current->whitespace;
184186
temp = realloc(all, allsize);
@@ -189,8 +191,8 @@ mmdCopyAllText(mmd_t *node) // I - Parent node
189191
return (NULL);
190192
}
191193

192-
allptr = temp + (allptr - all);
193194
all = temp;
195+
allptr = all + alloff;
194196

195197
if (current->whitespace)
196198
*allptr++ = ' ';

0 commit comments

Comments
 (0)