diff options
| author | Tero Kontkanen <tero.kontkanen@granitedevices.fi> | 2017-06-22 03:02:05 +0300 |
|---|---|---|
| committer | Tero Kontkanen <tero.kontkanen@granitedevices.fi> | 2017-06-22 03:02:05 +0300 |
| commit | 8ba99c8b3bef15c8fd4737c845b2fb6d65ec4196 (patch) | |
| tree | 7670879ad6e650d079b726f15e98b72f64af71dd | |
| parent | 7765b619bb3406cc8960f66d5f86fb23e1df87d0 (diff) | |
| download | SimpleMotionV2-8ba99c8b3bef15c8fd4737c845b2fb6d65ec4196.tar.gz SimpleMotionV2-8ba99c8b3bef15c8fd4737c845b2fb6d65ec4196.zip | |
Fix smLoadConfigurationFrom. Loading failed always since RAM buffer feature was added.
| -rw-r--r-- | devicedeployment.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/devicedeployment.c b/devicedeployment.c index 18e9748..bf05cf0 100644 --- a/devicedeployment.c +++ b/devicedeployment.c @@ -36,7 +36,7 @@ unsigned int readFileLine( const smuint8 *data, const int dataLen, int *readPosi char c; do { - if(*readPosition>=dataLen)//end of data buffer + if((*readPosition)>=dataLen)//end of data buffer { *eof=smtrue; c=0; @@ -44,12 +44,12 @@ unsigned int readFileLine( const smuint8 *data, const int dataLen, int *readPosi else { *eof=smfalse; - c=data[*readPosition+len]; + c=data[(*readPosition)]; (*readPosition)++; } //eol or eof - if( *eof==smtrue || c=='\n' || c=='\r' || len>=charlimit-1 ) + if( (*eof)==smtrue || c=='\n' || c=='\r' || len>=charlimit-1 ) { output[len]=0;//terminate str return len; |
