Fork of Smoothie to port to mbed non-LPC targets.
Fork of Smoothie by
Diff: libs/ConfigSources/FileConfigSource.cpp
- Revision:
- 3:f151d08d335c
- Parent:
- 2:1df0b61d3b5a
diff -r 1df0b61d3b5a -r f151d08d335c libs/ConfigSources/FileConfigSource.cpp --- a/libs/ConfigSources/FileConfigSource.cpp Fri Feb 28 18:52:52 2014 -0800 +++ b/libs/ConfigSources/FileConfigSource.cpp Sun Mar 02 06:33:08 2014 +0000 @@ -9,7 +9,6 @@ #include "ConfigValue.h" #include "FileConfigSource.h" #include "ConfigCache.h" -#include <malloc.h> using namespace std; @@ -68,8 +67,8 @@ // Update value for( int i = value.length(); i < free_space; i++){ value += " "; } fpos_t pos; - fgetpos( lp, &pos ); - int start = pos - buffer.length() + begin_value - 1; + int position = fgetpos( lp, &pos ); + int start = position - buffer.length() + begin_value - 1; fseek(lp, start, SEEK_SET); fputs(value.c_str(), lp); fclose(lp);