Mercurial > octave
diff libinterp/corefcn/oct-stream.cc @ 20252:7fa170cc14fe stable
Return correct hex value for printf when used with string inputs (bug #45263).
* oct-stream.cc (ok_for_signed_int_conv): Return true for strings.
* ov-ch-mat.cc (int64_scalar_value, uint64_scalar_value): New functions to
return int64 or uint64 values from a character matrix octave_value.
ov-ch-mat.h: (int64_scalar_value, uint64_scalar_value): Declare new functions
in header file.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 09 Jun 2015 16:25:45 -0700 |
parents | 17d647821d61 |
children | 0d94ec291ee6 b48d65c5df5b |
line wrap: on
line diff
--- a/libinterp/corefcn/oct-stream.cc Tue Jun 09 16:16:44 2015 -0700 +++ b/libinterp/corefcn/oct-stream.cc Tue Jun 09 16:25:45 2015 -0700 @@ -2435,7 +2435,7 @@ uint64_t limit = std::numeric_limits<int64_t>::max (); if (val.is_string ()) - return false; + return true; else if (val.is_integer_type ()) { if (val.is_uint64_type ()) @@ -2463,7 +2463,7 @@ ok_for_unsigned_int_conv (const octave_value& val) { if (val.is_string ()) - return false; + return true; else if (val.is_integer_type ()) { // Easier than dispatching here...