svnno****@sourc*****
svnno****@sourc*****
2011年 4月 26日 (火) 11:46:35 JST
Revision: 4457 http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=4457 Author: doda Date: 2011-04-26 11:46:35 +0900 (Tue, 26 Apr 2011) Log Message: ----------- è²ã å£ãã¦ããã®ãä¿®æ£ã ã»NULL Termination ãå¿ãã¦ã ã»\ooo å½¢å¼ãæ£ããå¤æãããªãã£ã Modified Paths: -------------- trunk/TTXSamples/TTXRecurringCommand/TTXRecurringCommand.c -------------- next part -------------- Modified: trunk/TTXSamples/TTXRecurringCommand/TTXRecurringCommand.c =================================================================== --- trunk/TTXSamples/TTXRecurringCommand/TTXRecurringCommand.c 2011-04-25 06:00:31 UTC (rev 4456) +++ trunk/TTXSamples/TTXRecurringCommand/TTXRecurringCommand.c 2011-04-26 02:46:35 UTC (rev 4457) @@ -92,7 +92,7 @@ // \n, \tðWJ·éB // common/ttlib.c:RestoreNewLine()ªx[XB // -void UnEscapeStr(BYTE *Text) +int UnEscapeStr(BYTE *Text) { int i; unsigned char *src, *dst; @@ -152,9 +152,11 @@ for (i=0; i<3; i++) { if (*src < '0' || *src > '7') break; - *dst = *dst << 3 + *src - '0'; + *dst = (*dst << 3) + *src - '0'; + src++; } src--; + break; default: *dst = '\\'; src--; @@ -166,7 +168,9 @@ src++; dst++; } - return (dst - Text); + *dst = '\0'; + + return (int)(dst - Text); } //