Use line.reserve in sdobj_ReadFile instead of constructor

Passing a count parameter to the vector constructor does not reserve
count elements but instead fills the vector with count elements.
This caused the endianness check to fail first because the first 256
characters were null bytes.
This commit is contained in:
Ruben Zwietering authored and Eldred Habert committed 2024-08-18 19:44:04 +02:00
1 parent 589cea47f6
commit 379aa8c267
1 file changed
+2 -1
+2 -1
View File
@@ -136,7 +136,8 @@ enum RelocFlags {
};
void sdobj_ReadFile(FileStackNode const &where, FILE *file, std::vector<Symbol> &fileSymbols) {
std::vector<char> line(256);
std::vector<char> line;
line.reserve(256);
char const *token;
#define getToken(ptr, ...) \