Mercurial > hg > dmlib
comparison src/dmgrowbuf.c @ 1705:bfba31c09f0b
Fix offset check in dmGrowBufGetU8().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 05 Jun 2018 19:50:16 +0300 |
parents | fcc568e03bed |
children | 311b14855a1e |
comparison
equal
deleted
inserted
replaced
1704:7eb00206b36d | 1705:bfba31c09f0b |
---|---|
368 else | 368 else |
369 return FALSE; | 369 return FALSE; |
370 } | 370 } |
371 else | 371 else |
372 { | 372 { |
373 if (buf->offs < buf->len) | 373 if (buf->offs <= buf->len) |
374 *value = buf->data[buf->offs++]; | 374 *value = buf->data[buf->offs++]; |
375 else | 375 else |
376 return FALSE; | 376 return FALSE; |
377 } | 377 } |
378 | 378 |