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
2024-08-13 21:32:25 +02:00
committed by Eldred Habert
parent 589cea47f6
commit 379aa8c267

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, ...) \