diff --git a/docs/examples/fopen.c b/docs/examples/fopen.c index f1706fbe63..7151adddec 100644 --- a/docs/examples/fopen.c +++ b/docs/examples/fopen.c @@ -211,7 +211,7 @@ static int fill_buffer(URL_FILE *file, size_t want) static int use_buffer(URL_FILE *file, size_t want) { /* sort out buffer */ - if((file->buffer_pos - want) <= 0) { + if(file->buffer_pos <= want) { /* ditch buffer - write will recreate */ free(file->buffer); file->buffer = NULL;