[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #44864] lazy_index produces error with printf(
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #44864] lazy_index produces error with printf("%i") |
Date: |
Sat, 25 Apr 2015 05:29:17 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0 |
Follow-up Comment #3, bug #44864 (project octave):
The patch is very close. It no longer errors out, but the indices are off by
1; They are zero-based rather than one-based.
printf("%i ",find([true true]))
0 1
We could always add 1 to the result of fast_elem_extract(), but I suspect that
is not the right thing to do.
+octave_lazy_index::fast_elem_extract (octave_idx_type n) const
+{
+ return double (index.checkelem (n));
+}
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?44864>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/