From cb1ee20ed16f51165ba47cc53a1506aa1284d385 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 4 Sep 2008 17:05:29 -0700 Subject: [PATCH] sane.ds: Workaround for wsprintf does not support floats. --- dlls/sane.ds/ui.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/sane.ds/ui.c b/dlls/sane.ds/ui.c index 83006c5..613a5e6 100644 --- a/dlls/sane.ds/ui.c +++ b/dlls/sane.ds/ui.c @@ -626,8 +626,9 @@ static void UpdateRelevantEdit(HWND hwnd, const SANE_Option_Descriptor *opt, } else if (opt->type == SANE_TYPE_FIXED) { - static const WCHAR formatW[] = {'%','f',0}; + static const WCHAR formatW[] = {'%','S',0}; double s_quant, dd; + CHAR buf[244]; s_quant = SANE_UNFIX(opt->constraint.range->quant); @@ -636,7 +637,8 @@ static void UpdateRelevantEdit(HWND hwnd, const SANE_Option_Descriptor *opt, else dd = position * 0.01; - len = wsprintfW( buffer, formatW, dd ); + sprintf( buf, "%f", dd ); + len = wsprintfW( buffer, formatW, buf ); } else return; -- 1.5.4.5