Commit 48ab3f11 authored by Radek Polak's avatar Radek Polak

readSysfsStr - fix string ending

parent c450c48e
......@@ -1744,10 +1744,10 @@ int Qtopia::readSysfsStr(const char *path, char *buf, int bufLen, bool warnOnErr
buf[0] = 0;
return errRes;
}
if(buf[n] == '\n') // remove new line char
buf[n] = 0;
if(buf[n-1] == '\n') // remove new line char
buf[n-1] = 0;
else
buf[n+1] = 0; // terminate string
buf[n] = 0; // terminate string
return n;
}
......
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