File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff 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 ++ = ' ' ;
You can’t perform that action at this time.
0 commit comments