- Timestamp:
- Nov 6, 2015, 10:53:44 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/tools/src/fits_to_mysql.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/tools/src/fits_to_mysql.c
r39059 r39060 311 311 char output[128]; // I can use a fixed-length buffer since sprintf_double prints no more than 22 bytes; 312 312 313 int Nbyte = sprintf_double (output, value); 313 output[0] = 0x27; 314 int Nbyte = sprintf_double (&output[1], value); 315 output[Nbyte+1] = 0x27; // 'asdf' : 012345 316 output[Nbyte+2] = 0; 317 Nbyte += 2; 314 318 315 319 if (buffer[0].Nbuffer + Nbyte + 1 >= buffer[0].Nalloc) { … … 319 323 320 324 strcpy (&buffer[0].buffer[buffer[0].Nbuffer], output); 321 buffer[0].Nbuffer += Nbyte; 325 buffer[0].Nbuffer += Nbyte; // buffer[Nbuffer] is the EOL null byte 322 326 323 327 return (TRUE); … … 331 335 char output[128]; // I can use a fixed-length buffer since sprintf_float prints no more than 14 bytes; 332 336 333 int Nbyte = sprintf_float (output, value); 337 output[0] = 0x27; 338 int Nbyte = sprintf_float (&output[1], value); 339 output[Nbyte+1] = 0x27; // 'asdf' : 012345 340 output[Nbyte+2] = 0; 341 Nbyte += 2; 334 342 335 343 if (buffer[0].Nbuffer + Nbyte + 1 >= buffer[0].Nalloc) { … … 339 347 340 348 strcpy (&buffer[0].buffer[buffer[0].Nbuffer], output); 341 buffer[0].Nbuffer += Nbyte; 349 buffer[0].Nbuffer += Nbyte; // buffer[Nbuffer] is the EOL null byte 342 350 343 351 return (TRUE);
Note:
See TracChangeset
for help on using the changeset viewer.
