why do we check for ptr being null or not, when we deref ptr one line above ?
something's wrong in the code logic
A+

Le 27 octobre 2011 04:53, Frédéric Delanoy <frederic.delanoy@gmail.com> a écrit :
---
 programs/cmd/wcmdmain.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index 56aa85f..1bcc598 100644
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -278,7 +278,7 @@ static void WCMD_output_asis_handle (DWORD std_handle, const WCHAR *message) {
        ptr++;
      };
      if (*ptr == '\n') ptr++;
-      WCMD_output_asis_len(message, (ptr) ? ptr - message : strlenW(message), handle);
+      WCMD_output_asis_len(message, (ptr) ? (DWORD)(ptr - message) : strlenW(message), handle);
      if (ptr) {
        numChars = 0;
        if (++line_count >= max_height - 1) {
--
1.7.7.1






--
--
Eric Pouech