diff --git a/racing.cpp b/racing.cpp index c82d6cb5..552a53f3 100644 --- a/racing.cpp +++ b/racing.cpp @@ -142,15 +142,17 @@ bool read_ghosts(string seed, int mcode) { if(seed == "OFFICIAL" && mcode == 2) { fhstream f("officials.data", "rb"); - f.get(); - hread(f, oghostset()); + if(f.f) { + hread(f, f.vernum); + hread(f, oghostset()); + } } string fname = ghost_filename(seed, mcode); println(hlog, "trying to read ghosts from: ", fname); fhstream f(fname, "rb"); if(!f.f) return false; - f.vernum = f.get (); + hread(f, f.vernum); if(f.vernum <= 0xA600) return true; // scores removed due to the possibility of cheating hread(f, ghostset()); return true; @@ -641,7 +643,7 @@ void generate_track() { for(int i=0; i