1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-26 00:55:14 +00:00
freebsd-ports/japanese/xtr/files/patch-str-xstring.c
Pav Lucistnik 25aa836578 - Unbreak with gcc42
PR:		ports/121637
Submitted by:	TANAKA Hiroyuki <kattyo@abk.nu> (maintainer)
2008-03-27 17:06:05 +00:00

24 lines
497 B
C

--- src/xstring.c.orig 2008-03-27 17:58:25.000000000 +0100
+++ src/xstring.c 2008-03-27 18:02:39.000000000 +0100
@@ -351,10 +351,16 @@
uchar *dstp = dst;
while (*src) {
- if (IsKanjiStr(src))
- *((ushort*)dstp)++ = *((ushort*)src)++;
- else
- *dstp++ = (*func)(*src++);
+ if (IsKanjiStr(src)) {
+ *((ushort*)dstp) = *((ushort*)src);
+ (ushort*)src++;
+ (ushort*)dstp++;
+ }
+ else {
+ *dstp = (*func)(*src);
+ src++;
+ dstp++;
+ }
}
*dstp = 0;
return dstp - dst;