mirror of
https://github.com/kiwix/java-libkiwix.git
synced 2025-09-08 22:58:18 -04:00
Fix iterator next
.
`next` must return the "next" value. But here, the next value is the value of the current iterator.
This commit is contained in:
parent
7315228b06
commit
1806febcf4
@ -64,8 +64,8 @@ METHOD0(jboolean, hasNext) {
|
||||
}
|
||||
|
||||
METHOD0(jobject, next) {
|
||||
(*THIS)++;
|
||||
zim::Entry entry = **THIS;
|
||||
(*THIS)++;
|
||||
return BUILD_WRAPPER("org/kiwix/libzim/Entry", entry);
|
||||
}
|
||||
|
||||
|
@ -49,8 +49,8 @@ METHOD0(jboolean, hasNext) {
|
||||
}
|
||||
|
||||
METHOD0(jobject, next) {
|
||||
(*THIS)++;
|
||||
zim::SuggestionItem item = **THIS;
|
||||
(*THIS)++;
|
||||
return BUILD_WRAPPER("org/kiwix/libzim/SuggestionItem", item);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user