1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-18 11:19:59 +00:00

fixed a crash with bitfield_editor in Shift+G

This commit is contained in:
Zeno Rogue 2019-01-17 00:49:35 +01:00
parent 52f273e3f2
commit f58de16a2e

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 {