Skip to content

Commit

Permalink
test_spack: Fix argument types in testcase
Browse files Browse the repository at this point in the history
uint8_t obviously doesn't match the fmtstring for uint64_t.
Since it gets promoted to int, it still worked for uint{8,16,32}_t,
but it only worked for uint64_t by chance.

Should fix MSYS build error that appeared with a gcc update:
https://github.com/mmitch/gbsplay/actions/runs/6474003670/job/17577957685
  • Loading branch information
ranma committed Oct 11, 2023
1 parent ebd9737 commit ba9c2ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions util.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ test void test_spack()
0x31, 1, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 4 };
uint8_t got[sizeof(want)] = { 0 };
uint8_t b = 1;
uint8_t w = 2;
uint8_t d = 3;
uint8_t q = 4;
uint16_t w = 2;
uint32_t d = 3;
uint64_t q = 4;

int l = spack(got, "{ }<bwdq{1}>bwdq", b, w, d, q, b, w, d, q);

Expand Down

0 comments on commit ba9c2ce

Please sign in to comment.