diff options
| author | Dani Martin <[email protected]> | 2020-03-30 13:51:36 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-03-30 13:51:36 +0200 |
| commit | 62cdb2299bd2a9f96f854b06fee5e4429a5f9e25 (patch) | |
| tree | b26b3404c3d7ab81ade9978186e28081914eb71e /examples/core/core_basic_window.c | |
| parent | 9b66883e0b1278958420a7e6259402db15f3ac18 (diff) | |
| download | raylib-62cdb2299bd2a9f96f854b06fee5e4429a5f9e25.tar.gz raylib-62cdb2299bd2a9f96f854b06fee5e4429a5f9e25.zip | |
[cppcheck] Improvements in SaveStorageValue() in core.c (#1160)
* [cppcheck] Improvements in SaveStorageValue() in core.c
in file core.c cppcheck shows errors only in function SaveStorageValue():
* Common realloc mistake: 'fileData' nulled but not freed upon failure
* Memory pointed to by 'fileData' is freed twice.
Validation:
* Tested examples/core/core_storage_values.c
* Launched Unit Test for this function
* Rerun CPPCHECK afer fix
* [cppcheck] Change functions header to accept only positive position in files
Changes:
* Functions SaveStorageValue(), LoadStorageValue() (core.c)
* Functions LoadFileData(), SaveFileData() (utils.c)
* Headers in raylib.h
Validation:
* Tested examples/core/core_storage_values.c
* Launched Unit Test for these functions
* Rerun CPPCHECK afer fix
Diffstat (limited to 'examples/core/core_basic_window.c')
0 files changed, 0 insertions, 0 deletions
