From: <sv...@op...> - 2024-06-05 16:42:05
|
Author: sagamusix Date: Wed Jun 5 18:41:58 2024 New Revision: 20928 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20928 Log: [Var] ancient: Update to commit bdff39426d0460a6b114712b14da6cb40ccadb77 (2024-06-05) Modified: trunk/OpenMPT/include/ancient/OpenMPT.txt trunk/OpenMPT/include/ancient/src/common/MemoryBuffer.cpp Modified: trunk/OpenMPT/include/ancient/OpenMPT.txt ============================================================================== --- trunk/OpenMPT/include/ancient/OpenMPT.txt Wed Jun 5 15:42:51 2024 (r20927) +++ trunk/OpenMPT/include/ancient/OpenMPT.txt Wed Jun 5 18:41:58 2024 (r20928) @@ -1,3 +1,3 @@ * ancient <https://github.com/temisu/ancient> commit - 1a176949acdebefb6303d69e315837fc0d8bb166 (2024-03-26) + bdff39426d0460a6b114712b14da6cb40ccadb77 (2024-06-05) * Unnecssary files have been removed. Modified: trunk/OpenMPT/include/ancient/src/common/MemoryBuffer.cpp ============================================================================== --- trunk/OpenMPT/include/ancient/src/common/MemoryBuffer.cpp Wed Jun 5 15:42:51 2024 (r20927) +++ trunk/OpenMPT/include/ancient/src/common/MemoryBuffer.cpp Wed Jun 5 18:41:58 2024 (r20928) @@ -53,8 +53,15 @@ return true; } -void MemoryBuffer::resize(size_t newSize) +void MemoryBuffer::resize(size_t newSize) { + if (!newSize) + { + std::free(_data); + _data=nullptr; + _size=0; + return; + } uint8_t *newData=reinterpret_cast<uint8_t*>(std::realloc(_data,newSize)); if (!newData) { |