Skip to content

Commit 74c1eb2

Browse files
authored
Merge pull request #6855 from ocaisa/patch-1
fix compile issue with GCC13.2.0 on Zen4
2 parents 946b150 + 10a7abc commit 74c1eb2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/common/libutil/basemoji.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ int uint64_basemoji_encode (uint64_t id, char *buf, int buflen)
176176
/* Copy 4-byte emojis back in order so that most significant bits are
177177
* on the left:
178178
*/
179-
for (int i = count - 4; i >= 0; i-=4) {
180-
memcpy (buf+n, reverse+i, 4);
179+
for (int i = 0; i < count; i+=4) {
180+
memcpy (buf+n, reverse+(count-4-i), 4);
181181
n+=4;
182182
}
183183
return 0;

0 commit comments

Comments
 (0)