mirror of
https://github.com/richardghirst/PiBits.git
synced 2024-11-28 12:24:11 +01:00
Fix bug in read() calculating data length
This commit is contained in:
parent
718ff6e4be
commit
f73e2a47f4
@ -369,7 +369,7 @@ static ssize_t dev_read(struct file *filp, char *buf, size_t count, loff_t *f_po
|
||||
p += snprintf(p, end - p, "%i=%i\n", servo,
|
||||
servo_pos[servo]);
|
||||
}
|
||||
pdata->rd_len = end - p;
|
||||
pdata->rd_len = p - pdata->rd_data;
|
||||
}
|
||||
|
||||
if (*f_pos < pdata->rd_len) {
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user