Dear Scott,

  On Tue, 14 Mar 2006 at 7:51pm, Scott W Gifford wrote:

It also contains wide-character synce-registry fixes
Can you explain what your fixes are?  I looked through the code, and
they weren't obvious to me.
I am absolutely sorry. I do remember I was fixing something, but now it looks like I posted the wrong file. The obvious thing was to add wstr_to_current() call just before printing REG_SZ like this:

----------------------------------------------------------------------

--- synce-install-cab/synce-registry.c       2006-01-21 04:51:38.000000000 +0300
+++ synce-registry.c    2006-03-19 03:04:56.000000000 +0300
@@ -60,7 +60,7 @@
   DWORD value_size = 0;
   uint8_t* value = NULL;
   HRESULT hr;
-
+  char* current;
 char * setval=NULL;
 DWORD  valdword;

@@ -160,7 +160,9 @@
   switch (value_type)
   {
     case REG_SZ:
-      printf("\"%s\"", (const char*)value);
+      current = wstr_to_current((LPCWSTR) value);
+      printf("\"%s\"", (const char*)current);
+      wstr_free_string(current);
       break;

----------------------------------------------------------------------

I have also updated the archive at http://kapitza.ras.ru/~leva/synce-install-cab.tar.bz2

I don't remember if I found more bugs like that one earlier. Anyway, you patch seems to address this issue (I am not sure, though, that wstr_to_ascii is the best choice under non-ascii locale).

Thanks
-L.


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Synce-devel mailing list
Synce-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synce-devel

Reply via email to