From d9f155ee4b0b2f41673ef2ce4cfd6ec8096a62a4 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 18 Dec 2011 20:11:34 +0000 Subject: [PATCH] pack git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13818 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/ptp2/ptp-pack.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/camlibs/ptp2/ptp-pack.c b/camlibs/ptp2/ptp-pack.c index 18c451327..eceb61bc7 100644 --- a/camlibs/ptp2/ptp-pack.c +++ b/camlibs/ptp2/ptp-pack.c @@ -163,8 +163,9 @@ ptp_pack_string(PTPParams *params, char *string, unsigned char* data, uint16_t o /* Cannot exceed 255 (PTP_MAXSTRLEN) since it is a single byte, duh ... */ memset(ucs2strp, 0, sizeof(ucs2str)); /* XXX: necessary? */ + /*ptp_debug (params ,"pack_string of %s", string);*/ #ifdef HAVE_ICONV - if (params->cd_locale_to_ucs2 == (iconv_t)-1) { + if (params->cd_locale_to_ucs2 != (iconv_t)-1) { size_t nconv; size_t convmax = PTP_MAXSTRLEN * 2; /* Includes the terminator */ char *stringp = string; @@ -174,7 +175,7 @@ ptp_pack_string(PTPParams *params, char *string, unsigned char* data, uint16_t o if (nconv == (size_t) -1) ucs2str[0] = 0x0000U; } else -#else +#endif { int i; for (i=0;i