Fix potential bugs #70

Closed
wants to merge 2 commits into
from
Commits on Apr 17, 2012
  1. load: Avoid unexpected behaviour in macro expansion

    Janne Kulmala committed Apr 17, 2012
    Macros can be dangerous if the inserted arguments are not properly
    parenthesised. As macro expansion does a simple replacement, inserting
    a certain expression can cause the evaluation order of the macro expression
    to change.
  2. load: Change buffer_pos to be a size_t

    Janne Kulmala committed Apr 17, 2012
    buffer_pos should be type size_t, because it's used to store the
    current position in the read buffer. Also, it never can be negative.