summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/examples/fopen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/examples/fopen.c b/docs/examples/fopen.c
index f1706fbe6..7151addde 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;