[PATCH] * when comparing the coded result with the expected coded values, do not compare n bytes where n is the result of gsm_7bit_encode() but the actual length of the input string as gsm_7bit_encode() returns the number of septets not octets
19 Jul
2010
19 Jul
'10
11:01 p.m.
--- tests/sms/sms_test.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tests/sms/sms_test.c b/tests/sms/sms_test.c index 3742dd8..cab91ab 100644 --- a/tests/sms/sms_test.c +++ b/tests/sms/sms_test.c @@ -99,7 +99,7 @@ int main(int argc, char** argv) return -1; } - if (memcmp(coded, test_encode[i].expected, length) != 0) { + if (memcmp(coded, test_encode[i].expected, strlen(test_encode[i].expected)) != 0) { fprintf(stderr, "Encoded content does not match for %d\n", i); return -1; -- 1.7.1 --Kj7319i9nmIyA2yE--
5965
Age (days ago)
5965
Last active (days ago)
0 comments
1 participants
participants (1)
-
Nico Golde