mirror of
https://github.com/kiwix/java-libkiwix.git
synced 2025-09-09 07:08:49 -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) {
|
METHOD0(jobject, next) {
|
||||||
(*THIS)++;
|
|
||||||
zim::Entry entry = **THIS;
|
zim::Entry entry = **THIS;
|
||||||
|
(*THIS)++;
|
||||||
return BUILD_WRAPPER("org/kiwix/libzim/Entry", entry);
|
return BUILD_WRAPPER("org/kiwix/libzim/Entry", entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,8 +49,8 @@ METHOD0(jboolean, hasNext) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
METHOD0(jobject, next) {
|
METHOD0(jobject, next) {
|
||||||
(*THIS)++;
|
|
||||||
zim::SuggestionItem item = **THIS;
|
zim::SuggestionItem item = **THIS;
|
||||||
|
(*THIS)++;
|
||||||
return BUILD_WRAPPER("org/kiwix/libzim/SuggestionItem", item);
|
return BUILD_WRAPPER("org/kiwix/libzim/SuggestionItem", item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user