From 8e25e7a4728b7fc89cf1814b6739e86f93c97e47 Mon Sep 17 00:00:00 2001 From: Yury Kurlykov Date: Thu, 5 Dec 2019 00:45:39 +1000 Subject: [PATCH] Fix signature size constant I should have paid more attention to sizeof of string literals. --- inc/YeltsinDB/constants.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/YeltsinDB/constants.h b/inc/YeltsinDB/constants.h index 5344e63..939e568 100644 --- a/inc/YeltsinDB/constants.h +++ b/inc/YeltsinDB/constants.h @@ -10,7 +10,7 @@ */ #define YDB_TABLE_FILE_SIGN "TBL!" -#define YDB_TABLE_FILE_SIGN_SIZE (sizeof(YDB_TABLE_FILE_SIGN)) +#define YDB_TABLE_FILE_SIGN_SIZE (sizeof(YDB_TABLE_FILE_SIGN)-1) #define YDB_TABLE_FILE_VER_MAJOR_SIZE (1) #define YDB_TABLE_FILE_VER_MINOR_SIZE (1) #define YDB_TABLE_FILE_DATA_START_OFFSET (YDB_TABLE_FILE_SIGN_SIZE + YDB_TABLE_FILE_VER_MAJOR_SIZE + \