Commit 147b34e2 authored by serg@serg.mylan's avatar serg@serg.mylan

snprintf compatibility fix

parent 083acc29
......@@ -130,7 +130,11 @@ int main(int argc,char *argv[])
#error
#endif
#ifdef HAVE_SNPRINTF
snprintf(buf,MAX_LEN,"%.*s",(int) keylen,info->lastkey+1);
#else
sprintf(buf,"%.*s",(int) keylen,info->lastkey+1);
#endif
casedn_str(buf);
total++;
lengths[keylen]++;
......
......@@ -742,7 +742,7 @@ void Field_decimal::store(double nr)
char buff[320];
fyllchar = zerofill ? (char) '0' : (char) ' ';
#ifdef HAVE_SNPRINTF_
#ifdef HAVE_SNPRINTF
buff[sizeof(buff)-1]=0; // Safety
snprintf(buff,sizeof(buff)-1, "%.*f",(int) dec,nr);
#else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment