Module: kamailio
Branch: master
Commit: 65ccf80c90e007d7636e973009d8cb2446cd8821
URL:
https://github.com/kamailio/kamailio/commit/65ccf80c90e007d7636e973009d8cb2…
Author: mtryfoss <morten(a)tryfoss.no>
Committer: GitHub <noreply(a)github.com>
Date: 2023-10-10T14:01:38+02:00
smsops: avoid c99 error (#3597)
---
Modified: src/modules/smsops/smsops_impl.c
---
Diff:
https://github.com/kamailio/kamailio/commit/65ccf80c90e007d7636e973009d8cb2…
Patch:
https://github.com/kamailio/kamailio/commit/65ccf80c90e007d7636e973009d8cb2…
---
diff --git a/src/modules/smsops/smsops_impl.c b/src/modules/smsops/smsops_impl.c
index 485a814774c..c8ccc2df4e1 100644
--- a/src/modules/smsops/smsops_impl.c
+++ b/src/modules/smsops/smsops_impl.c
@@ -511,8 +511,9 @@ int ucs2_to_utf8(char *ucs2, int ucs2_len, char *utf8)
uint16_t high_surrogate, low_surrogate;
uint32_t codepoint;
uint16_t ucs2_char;
+ size_t ucs2_index;
- for(size_t ucs2_index = 0; ucs2_index < ucs2_len; ucs2_index += 2) {
+ for(ucs2_index = 0; ucs2_index < ucs2_len; ucs2_index += 2) {
ucs2_char = (unsigned char)ucs2[ucs2_index];
ucs2_char = (ucs2_char << 8) | (unsigned char)ucs2[ucs2_index + 1];
if(ucs2_char <= 0x7F) {