Commit 3285c910 authored by Jean-Francois Dockes's avatar Jean-Francois Dockes
Browse files

off by one on mhd MHD_Result change: it came in 0.9.71...

parent 5227e0f0
......@@ -29,7 +29,7 @@
#include <microhttpd.h>
#if MHD_VERSION < 0x00097000
#if MHD_VERSION <= 0x00097000
#define MHD_Result int
#endif
......
......@@ -1404,8 +1404,11 @@ unsigned int stringToFlags(const vector<CharFlags>& flags,
stringToTokens(input, toks, sep);
for (auto& tok: toks) {
trimstring(tok);
out += std::accumulate(flags.begin(), flags.end(), out,
[&](int o, CharFlags flag){ return tok == flag.yesname ? o | flag.value : o; });
out = std::accumulate(
flags.begin(), flags.end(), out,
[&](unsigned int o, CharFlags flag) {
return tok == flag.yesname ? o | flag.value : o;
});
}
return out;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment