Mercurial > octave
changeset 25874:11f63a33732e
dlmread.cc: Avoid tolower which causes problems when locale changes (bug #54622).
* dlmread.cc (Fdlmread): Replace std::tolower with explicit test for 'i', 'I',
'j', 'J' characters.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 11 Sep 2018 10:36:58 -0700 |
parents | 75f7e8728e17 |
children | eba6d823cf62 |
files | libinterp/corefcn/dlmread.cc |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/dlmread.cc Mon Sep 10 11:06:43 2018 -0700 +++ b/libinterp/corefcn/dlmread.cc Tue Sep 11 10:36:58 2018 -0700 @@ -446,8 +446,9 @@ } else { - int next_char = std::tolower (tmp_stream.peek ()); - if (next_char == 'i' || next_char == 'j') + int next_char = tmp_stream.peek (); + if (next_char == 'i' || next_char == 'j' + || next_char == 'I' || next_char == 'J') { // Process pure imaginary numbers. tmp_stream.get ();