]> git.sesse.net Git - remoteglot-book/commitdiff
Fix a field ordering messup caused by the memory saving changes.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 13 Dec 2014 14:29:52 +0000 (15:29 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 13 Dec 2014 14:29:52 +0000 (15:29 +0100)
binloader.cpp

index 272fc30c900c32ee9d788b757683774b0f5c97f4..44088856081f05eb05e7ddb464a00ccbd4ddb98a 100644 (file)
@@ -132,8 +132,18 @@ int main(int argc, char **argv)
                        move[l] = 0;
 
                        int bucket = hash_key_to_bucket(bpfen, bpfen_len, num_buckets);
-                       elems[bucket].emplace_back(Element {bpfen, bpfen_len, {}, Result(r), opening_num, white_elo, black_elo, timestamp, file_num, start_position});
-                       strcpy(elems[bucket].back().move, move);
+                       Element e;
+                       e.bpfen = bpfen;
+                       e.bpfen_len = bpfen_len;
+                       strcpy(e.move, move);
+                       e.result = Result(r);
+                       e.opening_num = opening_num;
+                       e.white_elo = white_elo;
+                       e.black_elo = black_elo;
+                       e.file_num = file_num;
+                       e.timestamp = timestamp;
+                       e.start_position = start_position;
+                       elems[bucket].push_back(e);
                        ++num_elems;
                }
                fclose(fp);