mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-02-22 04:37:13 +01:00
Fix script loading.
Forgot to go back to the beginning of the file after reading the header. Bug was introduced in recent changes.
This commit is contained in:
parent
061110914a
commit
806bb2ba9d
@ -100,6 +100,8 @@ void ScriptSrc::Process()
|
|||||||
}
|
}
|
||||||
// Allocate enough space to hold the file data
|
// Allocate enough space to hold the file data
|
||||||
mData.resize(length, 0);
|
mData.resize(length, 0);
|
||||||
|
// Go back to the beginning
|
||||||
|
std::fseek(fp, 0, SEEK_SET);
|
||||||
// Read the file contents into allocated data
|
// Read the file contents into allocated data
|
||||||
std::fread(&mData[0], 1, length, fp);
|
std::fread(&mData[0], 1, length, fp);
|
||||||
// Where the last line ended
|
// Where the last line ended
|
||||||
|
Loading…
x
Reference in New Issue
Block a user