aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-kbdc/raw-data.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-12-11 16:10:17 +0100
committerMattias Andrée <maandree@operamail.com>2014-12-11 16:10:17 +0100
commit791599909ebbfd6fa9637d8d4cc937205e67b045 (patch)
tree462d2348c72c9496e2ccb78a93526c7935d3c8d8 /src/mds-kbdc/raw-data.c
parentsome small fixes (diff)
downloadmds-791599909ebbfd6fa9637d8d4cc937205e67b045.tar.gz
mds-791599909ebbfd6fa9637d8d4cc937205e67b045.tar.bz2
mds-791599909ebbfd6fa9637d8d4cc937205e67b045.tar.xz
mds-kbdc: minor bug fixes
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/mds-kbdc/raw-data.c')
-rw-r--r--src/mds-kbdc/raw-data.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mds-kbdc/raw-data.c b/src/mds-kbdc/raw-data.c
index d8976ec..995eb79 100644
--- a/src/mds-kbdc/raw-data.c
+++ b/src/mds-kbdc/raw-data.c
@@ -360,9 +360,9 @@ static int expand(char** restrict content, size_t* restrict content_size)
/* Expand tab spaces. */
memmove(data + extra, data, n);
for (ptr = 0; ptr < n; ptr++, added--)
- if (data[ptr] == '\n')
+ if (data[ptr + extra] == '\n')
data[ptr + added++] = data[ptr + extra], col = 0;
- else if (data[ptr] != '\t')
+ else if (data[ptr + extra] != '\t')
data[ptr + added++] = data[ptr + extra], col++;
else
do