Skip to content

Commit

Permalink
Fix issue related to pointer storage.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kalmard0 committed May 5, 2024
1 parent b3c8577 commit cf4b51b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inkcpp/value.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class value : public snapshot_interface

struct {
hash_t name;
char ci;
int ci;
} pointer;
};

Expand Down

0 comments on commit cf4b51b

Please sign in to comment.