Ignore:
Timestamp:
07/11/24 17:22:23 (3 months ago)
Author:
Maciej Komosinski
Message:

Added realloc() implementation that behaves like free() when size==0 - consistently on all platforms, in contrast to standard realloc()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/util/sstring-simple.cpp

    r1280 r1314  
    33#include <assert.h>
    44#include <common/nonstd_math.h>
     5#include <common/realloc-free0size.h>
    56
    67#ifdef __ANDROID__
     
    5253{
    5354        if (newsize == allocated) return;
    54         txt = (char*)realloc(txt, newsize);
     55        txt = (char*)realloc_free0size(txt, newsize);
    5556        allocated = newsize;
    5657}
Note: See TracChangeset for help on using the changeset viewer.