changeset 2391:8cd3873de8fa

* src/diag.cxx: when printing a long long, should not truncate its value to a long or int size
author jlarmour
date Thu, 31 May 2007 16:00:55 +0000
parents c71501f37296
children b9bdcb70cbde
files packages/infra/current/ChangeLog packages/infra/current/src/diag.cxx
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/packages/infra/current/ChangeLog
+++ b/packages/infra/current/ChangeLog
@@ -1,3 +1,8 @@
+2007-05-31  Rutger Hofman <rutger@cs.vu.nl>
+
+	* src/diag.cxx: when printing a long long, should not truncate
+	its value to a long or int size
+
 2006-10-26  Stefan Sommerfeld <sommerfeld@mikrom.com>
 
 	* include/cyg_types.h: fixed typo, __GNU_PATCHLEVEL__ was checked,
--- a/packages/infra/current/src/diag.cxx
+++ b/packages/infra/current/src/diag.cxx
@@ -375,7 +375,9 @@ static int
                     }
                 } else {
                     // Mask to unsigned, sized quantity
-                    if (islong) {
+                    if (islonglong) {
+                        // No need to mask
+                    } else if (islong) {
                         val &= ((long long)1 << (sizeof(long) * 8)) - 1;
                     } else{
                         val &= ((long long)1 << (sizeof(int) * 8)) - 1;