mirror of
https://github.com/Alcaro/Flips.git
synced 2026-09-07 01:56:07 -05:00
@@ -6,10 +6,12 @@
|
||||
#include "flips.h"
|
||||
#include "crc32.h"
|
||||
|
||||
//get rid of dependencies on libstdc++, they eat 200KB on Windows
|
||||
#ifdef __MINGW32__
|
||||
//get rid of dependencies on libstdc++, they waste 200KB on this platform
|
||||
void* operator new(size_t n) { return malloc(n); } // forget allocation failures, let them segfault.
|
||||
void operator delete(void * p) { free(p); }
|
||||
extern "C" void __cxa_pure_virtual() { while(1); }
|
||||
extern "C" void __cxa_pure_virtual() { abort(); }
|
||||
#endif
|
||||
|
||||
|
||||
//TODO: delete
|
||||
@@ -449,7 +451,8 @@ config::~config()
|
||||
{
|
||||
LPWSTR data = this->flatten();
|
||||
//puts(data);
|
||||
filewrite::write(this->filename, (struct mem){ (uint8_t*)data, wcslen(data)*sizeof(WCHAR) });
|
||||
struct mem m = { (uint8_t*)data, wcslen(data)*sizeof(WCHAR) };
|
||||
filewrite::write(this->filename, m);
|
||||
free(data);
|
||||
free(this->filename);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user