mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-22 19:38:53 -04:00
Merge pull request #169 from kiwix/infinit_redirect
Correctly pre-increment the loopCounter.
This commit is contained in:
commit
9997a6ec18
@ -626,7 +626,7 @@ static struct MHD_Response* handle_content(RequestContext* request)
|
|||||||
if (found) {
|
if (found) {
|
||||||
/* If redirect */
|
/* If redirect */
|
||||||
unsigned int loopCounter = 0;
|
unsigned int loopCounter = 0;
|
||||||
while (article.isRedirect() && loopCounter++ < 42) {
|
while (article.isRedirect() && ++loopCounter < 42) {
|
||||||
article = article.getRedirectArticle();
|
article = article.getRedirectArticle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user