fixed wrong scanf() arguments
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@109 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
c8cfb486fb
commit
3fc5256f83
@ -1703,7 +1703,7 @@ void wxPostScriptDC::GetTextExtent (const wxString& string, long *x, long *y,
|
||||
}
|
||||
// JC 1.) check for UnderlinePosition
|
||||
else if(strncmp(line,"UnderlinePosition",17)==0){
|
||||
if((sscanf(line,"%s%f",upString,&UnderlinePosition)!=2)
|
||||
if((sscanf(line,"%s%lf",upString,&UnderlinePosition)!=2)
|
||||
|| (strcmp(upString,"UnderlinePosition")!=0)) {
|
||||
wxDebugMsg("AFM-file '%s': line '%s' has error (bad UnderlinePosition)\n",
|
||||
afmName,line);
|
||||
@ -1711,7 +1711,8 @@ void wxPostScriptDC::GetTextExtent (const wxString& string, long *x, long *y,
|
||||
}
|
||||
// JC 2.) check for UnderlineThickness
|
||||
else if(strncmp(line,"UnderlineThickness",18)==0){
|
||||
if((sscanf(line,"%s%f",utString,&UnderlineThickness)!=2)
|
||||
if((sscanf(line,"%s%
|
||||
f",utString,&UnderlineThickness)!=2)
|
||||
|| (strcmp(utString,"UnderlineThickness")!=0)) {
|
||||
wxDebugMsg("AFM-file '%s': line '%s' has error (bad UnderlineThickness)\n",
|
||||
afmName,line);
|
||||
@ -2109,11 +2110,11 @@ wxDialog(parent, -1, title, pos, size, style)
|
||||
yPos += 25;
|
||||
|
||||
(void) new wxStaticText(this, -1, "X Translation", wxPoint(5, yPos));
|
||||
sprintf (buf, "%.2f", wx_printer_translate_x);
|
||||
sprintf (buf, "%.2ld", wx_printer_translate_x);
|
||||
/* wxTextCtrl *text3 = */ (void) new wxTextCtrl(this, wxID_PRINTER_X_TRANS, buf, wxPoint(100, -1), wxSize(100, -1));
|
||||
|
||||
(void) new wxStaticText(this, -1, "Y Translation", wxPoint(120, yPos));
|
||||
sprintf (buf, "%.2f", wx_printer_translate_y);
|
||||
sprintf (buf, "%.2ld", wx_printer_translate_y);
|
||||
/* wxTextCtrl *text4 = */ (void) new wxTextCtrl(this, wxID_PRINTER_Y_TRANS, buf, wxPoint(230, -1), wxSize(100, -1));
|
||||
|
||||
Fit ();
|
||||
|
Loading…
Reference in New Issue
Block a user