Fixed new 'alloc_length' resizing code.
[captive.git] / src / libcaptive / cc / sharedcachemap.c
index 69d8842..055611a 100644 (file)
@@ -200,7 +200,7 @@ size_t alloc_new;
 guint64 alloc64_new;
 gpointer buffer_new;
 
-               alloc64_new=CAPTIVE_ROUND_UP64((!size64_new ? 0 : MIN(size64_new*2,0x10000)),PAGE_SIZE);
+               alloc64_new=CAPTIVE_ROUND_UP64((!size64_new ? 0 : MAX(size64_new*2,0x10000)),PAGE_SIZE);
                alloc_new=alloc64_new;
                if (alloc_new!=alloc64_new)
                        goto size_new_big;