Author: fireball Date: Sun Jun 29 04:46:01 2008 New Revision: 34182
URL: http://svn.reactos.org/svn/reactos?rev=34182&view=rev Log: - Merge 34180 (RTL sprintf/swprintf fix).
Modified: branches/ros-branch-0_3_5/reactos/lib/rtl/sprintf.c branches/ros-branch-0_3_5/reactos/lib/rtl/swprintf.c
Modified: branches/ros-branch-0_3_5/reactos/lib/rtl/sprintf.c URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_5/reactos/lib/rtl... ============================================================================== --- branches/ros-branch-0_3_5/reactos/lib/rtl/sprintf.c [iso-8859-1] (original) +++ branches/ros-branch-0_3_5/reactos/lib/rtl/sprintf.c [iso-8859-1] Sun Jun 29 04:46:01 2008 @@ -691,20 +691,8 @@ if (str <= end) *str = '\0'; else if (cnt > 0) - { /* don't write out a null byte if the buf size is zero */ - //*end = '\0'; - if (str-buf >cnt ) - { - *end = '\0'; - } - else - { - end++; - *end = '\0'; - } - - } + *end = '\0'; return str-buf; }
Modified: branches/ros-branch-0_3_5/reactos/lib/rtl/swprintf.c URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_5/reactos/lib/rtl... ============================================================================== --- branches/ros-branch-0_3_5/reactos/lib/rtl/swprintf.c [iso-8859-1] (original) +++ branches/ros-branch-0_3_5/reactos/lib/rtl/swprintf.c [iso-8859-1] Sun Jun 29 04:46:01 2008 @@ -689,21 +689,9 @@ } if (str <= end) *str = L'\0'; - else if (cnt > 0) - { + else if (cnt > 0) /* don't write out a null byte if the buf size is zero */ - //*end = '\0'; - if (str-buf >cnt ) - { - *end = L'\0'; - } - else - { - end++; - *end = L'\0'; - } - - } + *end = L'\0'; return str-buf; }