From cf4b51bf85ccceb48ac33a076c314fcee1bc97ba Mon Sep 17 00:00:00 2001 From: Daniel Kalmar Date: Sun, 5 May 2024 19:12:18 +0200 Subject: [PATCH] Fix issue related to pointer storage. I'm not sure what the "ci" field does, but I noticed while testing inkcpp on various platforms that an unexpected crash happens related to it (it having a value of 255). After some investigation I realized that in every case other than storage, ci is treated as an int. As a matter of fact, various pieces of code expect it to be able to have the values of "255", "0" and "-1", which is impossible for an 8-bit type. This change fixes my crash and I believe is correct. --- inkcpp/value.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inkcpp/value.h b/inkcpp/value.h index 676affc4..70d70ee9 100644 --- a/inkcpp/value.h +++ b/inkcpp/value.h @@ -213,7 +213,7 @@ class value : public snapshot_interface struct { hash_t name; - char ci; + int ci; } pointer; };