comparison: src/buffer.c
src/buffer.c
- changeset 1007
- 81b2986d2b04
- parent 1005
- 67fa386ce600
equal
deleted
inserted
replaced
121 |
121 |
122 if ((offset > 0 && npos < opos) || (offset < 0 && npos > opos)) { |
122 if ((offset > 0 && npos < opos) || (offset < 0 && npos > opos)) { |
123 return -1; |
123 return -1; |
124 } |
124 } |
125 |
125 |
126 if (npos >= buffer->size) { |
126 if (npos > buffer->size) { |
127 return -1; |
127 return -1; |
128 } else { |
128 } else { |
129 buffer->pos = npos; |
129 buffer->pos = npos; |
130 return 0; |
130 return 0; |
131 } |
131 } |