# HG changeset patch # User darkvater # Date 1105834999 0 # Node ID 93393e1c8f9c8c503535646106a2f70f939ab0d5 # Parent a5e4705a738c4d1cb564a07b12bead3baa47e1e4 (svn r1532) -Fix: [1103078] default service period patch options are now cast to 0 with right variable size. diff -r a5e4705a738c -r 93393e1c8f9c settings_gui.c --- a/settings_gui.c Sat Jan 15 21:41:49 2005 +0000 +++ b/settings_gui.c Sun Jan 16 00:23:19 2005 +0000 @@ -737,7 +737,18 @@ { if ((pe->flags & PF_0ISDIS) && val <= 0) { - *(bool*)pe->variable = 0; // "clamp" 'disabled' value to smallest type, PE_BOOL + // "clamp" 'disabled' value to smallest type + switch (pe->type) { + case PE_BOOL: case PE_UINT8: + *(bool*)pe->variable = 0; + break; + case PE_INT16: case PE_UINT16: + *(int16*)pe->variable = 0; + break; + case PE_CURRENCY: case PE_INT32: + *(int32*)pe->variable = 0; + break; + } return; }