void ConvExecute(HWND hWnd)
{
DWORD c_cat = (DWORD)SendDlgItemMessage(hWnd, IDC_COMBO_CATEGORY, CB_GETCURSEL, 0, 0);
- const conv_t *items = conv_table[c_cat].items;
+ const conv_t *items = NULL;
DWORD from = SendDlgItemMessage(hWnd, IDC_COMBO_FROM, CB_GETCURSEL, 0, 0);
DWORD to = SendDlgItemMessage(hWnd, IDC_COMBO_TO, CB_GETCURSEL, 0, 0);
TCHAR txt_cb[128];
if (from == to)
return;
+ /* Search correct category, since it can be sorted too */
+ SendDlgItemMessage(hWnd, IDC_COMBO_CATEGORY, CB_GETLBTEXT, c_cat, (LPARAM)txt_cb);
+ for (c_cat=0; c_cat < SIZEOF(conv_table); c_cat++) {
+ LoadString(calc.hInstance, conv_table[c_cat].category, txt, SIZEOF(txt));
+ if (!_tcscmp(txt_cb, txt)) {
+ items = conv_table[c_cat].items;
+ break;
+ }
+ }
+
/* The units can be sorted, so I must search the exact match */
item = items;
SendDlgItemMessage(hWnd, IDC_COMBO_FROM, CB_GETLBTEXT, from, (LPARAM)txt_cb);
ConvAdjust(hWnd, 0);
}
+
{
stack_node_t *op, ip;
+ rpn_alloc(&ip.node.number);
rpn_copy(&ip.node.number, number);
while (!is_stack_empty()) {
op = pop();
}
}
rpn_copy(number, &ip.node.number);
+ rpn_free(&ip.node.number);
}
int eval_parent_count(void)
mpfr_init(calc.prev.mf);
mpfr_init(calc.memory.number.mf);
mpfr_init(temp.node.number.mf);
+ rpn_zero(&calc.memory.number);
}
void stop_rpn_engine(void)
+1.09 (20080630)
+=======================
+* Fixed bug with Conversion function: "Category" type must be found like "from" and "to" because the combobox sorts its items alphabetically.
+* Fixed bug with memory function and GNU multi-precision libraries: the memory must be initialized to zero when the calculator starts, otherwise "MP" will crash.
+* Fixed bug when closing an expression with right parentheses.
+
1.08 (20080520)
=======================
* Added macro DISABLE_HTMLHELP_SUPPORT for disabling the compilation of htmlhelp support.