mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix datafile building before the file is open
This commit is contained in:
parent
53d7e0dd4c
commit
a945cca8a5
|
@ -482,8 +482,6 @@ bool CDataFileWriter::Open(class IStorage *pStorage, const char *pFilename)
|
|||
|
||||
int CDataFileWriter::AddItem(int Type, int ID, int Size, void *pData)
|
||||
{
|
||||
if(!m_File) return 0;
|
||||
|
||||
dbg_assert(Type >= 0 && Type < 0xFFFF, "incorrect type");
|
||||
dbg_assert(m_NumItems < 1024, "too many items");
|
||||
dbg_assert(Size%sizeof(int) == 0, "incorrect boundary");
|
||||
|
@ -518,8 +516,6 @@ int CDataFileWriter::AddItem(int Type, int ID, int Size, void *pData)
|
|||
|
||||
int CDataFileWriter::AddData(int Size, void *pData)
|
||||
{
|
||||
if(!m_File) return 0;
|
||||
|
||||
dbg_assert(m_NumDatas < 1024, "too much data");
|
||||
|
||||
CDataInfo *pInfo = &m_pDatas[m_NumDatas];
|
||||
|
|
|
@ -108,7 +108,7 @@ void Process(IStorage *pStorage, const char *pMapName, const char *pConfigName)
|
|||
}
|
||||
|
||||
Reader.Close();
|
||||
if(!Writer.Open(pStorage, pMapName))
|
||||
if(!Writer.OpenFile(pStorage, pMapName))
|
||||
{
|
||||
dbg_msg("config_store", "couldn't open map file '%s' for writing", pMapName);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue