Skip to content

Commit

Permalink
Fix conversion to macro error
Browse files Browse the repository at this point in the history
  • Loading branch information
terryburton committed Sep 22, 2024
1 parent 00cfe0b commit eff55c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lint_couponcode.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ GS1_SYNTAX_DICTIONARY_API gs1_lint_err_t gs1_lint_couponcode(const char* const d
if (q - ++p < vli)
GS1_LINTER_RETURN_ERROR(
GS1_LINTER_COUPON_TRUNCATED_GCP,
(size_t)(p - data),
(size_t)(q - p)
(p == q) ? 0 : (size_t)(p - data),
(p == q) ? (size_t)(q - data) : (size_t)(q - p)
);

/*
Expand Down

0 comments on commit eff55c7

Please sign in to comment.