1
This commit is contained in:
13
test/函数块.cpp
13
test/函数块.cpp
@@ -241,7 +241,6 @@ int GetEquAddr(int addr)
|
||||
static int SQloadfile(uint32_t v, const wchar_t* filename, bool printerror)
|
||||
{
|
||||
void* file = SQfopen(filename, L"rb");
|
||||
//void* file = (void*)"IIIAAA <- 66487";
|
||||
int ret;
|
||||
unsigned short us;
|
||||
unsigned char uc;
|
||||
@@ -284,6 +283,18 @@ static int SQloadfile(uint32_t v, const wchar_t* filename, bool printerror)
|
||||
default: SQfseek(file, 0, 2); break; // ascii
|
||||
}
|
||||
|
||||
const char *add = "newstr";
|
||||
int prevpos = SQftell(file);
|
||||
SQfseek(file, 0, 1);
|
||||
int length = SQftell(file);
|
||||
SQfseek(file, prevpos, 2);
|
||||
char temp[256];
|
||||
SQwrite(&add, 1, sizeof(add), file);
|
||||
SQfread(&temp, length + 10, sizeof(temp), file);
|
||||
std::cout << temp << std::endl;
|
||||
|
||||
|
||||
|
||||
if (SQ_Compile(v, func, file, filename, printerror) >= 0)
|
||||
{
|
||||
SQ__Fclose(file);
|
||||
|
||||
Reference in New Issue
Block a user