fixed a crash with bitfield_editor in Shift+G

This commit is contained in:
Zeno Rogue
2019-02-06 18:48:52 +01:00
parent 52f273e3f2
commit f58de16a2e
+2 -2
View File
@@ -309,10 +309,10 @@ bool debugmode = false;
// static apparently does not work in old compilers
int bitfield_v;
template<class T> void bitfield_editor(int val, const T& setter, string help = "") {
template<class T> void bitfield_editor(int val, T setter, string help = "") {
bitfield_v = val;
dialog::editNumber(bitfield_v, 0, 100, 1, bitfield_v, help, "");
dialog::reaction = [&setter] () { setter(bitfield_v); };
dialog::reaction = [setter] () { setter(bitfield_v); };
}
struct debugScreen {