# HG changeset patch # User gthomas # Date 1088613776 0 # Node ID b4a8ef3180762b6cd46e20ad75dc4cab8dff4c37 # Parent f240fdd6a1e78910a5a3c9681527a260a56558c7 Fix returned length for %p diff --git a/packages/infra/current/ChangeLog b/packages/infra/current/ChangeLog --- a/packages/infra/current/ChangeLog +++ b/packages/infra/current/ChangeLog @@ -1,3 +1,7 @@ +2004-06-30 Gary Thomas + + * src/diag.cxx (_vprintf): Returned [length] was wrong for %p + 2004-04-16 Jonathan Larmour * tests/cxxsupp.cxx: Allow inline function to be correctly inlined. diff --git a/packages/infra/current/src/diag.cxx b/packages/infra/current/src/diag.cxx --- a/packages/infra/current/src/diag.cxx +++ b/packages/infra/current/src/diag.cxx @@ -9,7 +9,7 @@ // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -// Copyright (C) 2002 Gary Thomas +// Copyright (C) 2002, 2004 Gary Thomas // // eCos is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -392,6 +392,7 @@ static int (*putc)('x', param); zero_fill = true; left_prec = sizeof(unsigned long)*2; + res += 2; // Account for "0x" leadin case 'd': case 'D': case 'u':