Improved FPrint(f) passthrough

This commit is contained in:
Nicholas Hastings 2014-08-01 06:09:09 -07:00
parent c116353285
commit 5e7e7ce551
3 changed files with 4 additions and 4 deletions

View File

@ -93,7 +93,7 @@ public:
virtual int Read(void* pOutput, int size, FileHandle_t file) = 0;
virtual void Seek(FileHandle_t file, int post, int seekType) = 0;
virtual unsigned int Tell(FileHandle_t file) = 0;
virtual int WriteFileLine(FileHandle_t file, const char *pLine) = 0;
virtual int FPrint(FileHandle_t file, const char *pData) = 0;
virtual void Flush(FileHandle_t file) = 0;
};

View File

@ -587,7 +587,7 @@ static cell_t sm_WriteFileLine(IPluginContext *pContext, const cell_t *params)
FileHandle_t pFile = (FileHandle_t) pTempFile;
smcore.atcprintf(buffer, sizeof(buffer), fmt, pContext, params, &arg);
sprintf(buffer, "%s\n", buffer);
smcore.filesystem->WriteFileLine(pFile, buffer);
smcore.filesystem->FPrint(pFile, buffer);
}
else
{

View File

@ -186,9 +186,9 @@ public:
{
return filesystem->Tell(file);
}
int WriteFileLine(FileHandle_t file, const char *pLine)
int FPrint(FileHandle_t file, const char *pData)
{
return filesystem->FPrintf(file, pLine);
return filesystem->FPrintf(file, "%s", pData);
}
void Flush(FileHandle_t file)
{