From 7bfa64403e2918297de6bc071b4a2e7c07b1df28 Mon Sep 17 00:00:00 2001 From: Yury Kurlykov Date: Thu, 31 Oct 2019 01:10:23 +1000 Subject: [PATCH] Fix offsets in storage file generation --- src/ydb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ydb.c b/src/ydb.c index 17480eb..ee055bd 100644 --- a/src/ydb.c +++ b/src/ydb.c @@ -212,10 +212,11 @@ YDB_Error ydb_create_table(YDB_Engine *instance, const char *path) { FILE *f = fopen(path, "wb"); + // TODO test on other byte ordered archs char tpl[] = YDB_TABLE_FILE_SIGN "\x00\x01" - "\x00\x00\x00\x00\x00\x00\x00\x1E" - "\x00\x00\x00\x00\x00\x00\x00\x1E" + "\x1E\x00\x00\x00\x00\x00\x00\x00" + "\x1E\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00"; fwrite(tpl, sizeof(tpl)-1, 1, f);