Author: sagamusix
Date: Wed Jun 5 18:42:53 2024
New Revision: 20929
URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20929
Log:
Merged revision(s) 20928 from trunk/OpenMPT:
[Var] ancient: Update to commit bdff39426d0460a6b114712b14da6cb40ccadb77 (2024-06-05)
........
Modified:
branches/OpenMPT-1.31/ (props changed)
branches/OpenMPT-1.31/include/ancient/OpenMPT.txt
branches/OpenMPT-1.31/include/ancient/src/common/MemoryBuffer.cpp
Modified: branches/OpenMPT-1.31/include/ancient/OpenMPT.txt
==============================================================================
--- branches/OpenMPT-1.31/include/ancient/OpenMPT.txt Wed Jun 5 18:41:58 2024 (r20928)
+++ branches/OpenMPT-1.31/include/ancient/OpenMPT.txt Wed Jun 5 18:42:53 2024 (r20929)
@@ -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: branches/OpenMPT-1.31/include/ancient/src/common/MemoryBuffer.cpp
==============================================================================
--- branches/OpenMPT-1.31/include/ancient/src/common/MemoryBuffer.cpp Wed Jun 5 18:41:58 2024 (r20928)
+++ branches/OpenMPT-1.31/include/ancient/src/common/MemoryBuffer.cpp Wed Jun 5 18:42:53 2024 (r20929)
@@ -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)
{
|