diff liboctave/oct-inttypes.h @ 8191:9cb73236e552

fix uint64 mixed operations
author Jaroslav Hajek <highegg@gmail.com>
date Tue, 07 Oct 2008 15:28:45 +0200
parents 69c5cce38c29
children 5fd507839b76
line wrap: on
line diff
--- a/liboctave/oct-inttypes.h	Mon Oct 06 21:06:05 2008 -0400
+++ b/liboctave/oct-inttypes.h	Tue Oct 07 15:28:45 2008 +0200
@@ -987,7 +987,7 @@
   template <> \
   inline octave_uint64 \
   operator OP (const double& x, const octave_uint64& y) \
-  { return octave_int64 (x OP static_cast<long double> (y.value ())); } \
+  { return octave_uint64 (x OP static_cast<long double> (y.value ())); } \
   template <> \
   inline octave_int64 \
   operator OP (const octave_int64& x, const double& y) \
@@ -995,7 +995,7 @@
   template <> \
   inline octave_uint64 \
   operator OP (const octave_uint64& x, const double& y) \
-  { return octave_int64 (static_cast<long double> (x.value ()) OP y); }
+  { return octave_uint64 (static_cast<long double> (x.value ()) OP y); }
 
 #else
 // external handlers