Fix a bug where a pointer would be one character too far after putting
a '\0' at the end of a string. Submitted by: Martin Birgmeier <Martin.Birgmeier@aon.at>
This commit is contained in:
parent
c64893b10c
commit
aa50282cd1
@ -94,7 +94,7 @@ flags_to_string(flags, def)
|
||||
setflags &= ~mapping[i].flag;
|
||||
}
|
||||
}
|
||||
*dp++ = '\0';
|
||||
*dp = '\0';
|
||||
return (dp == string && def != NULL ? def : string);
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ flags_to_string(flags, def)
|
||||
setflags &= ~mapping[i].flag;
|
||||
}
|
||||
}
|
||||
*dp++ = '\0';
|
||||
*dp = '\0';
|
||||
return (dp == string && def != NULL ? def : string);
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ flags_to_string(flags, def)
|
||||
setflags &= ~mapping[i].flag;
|
||||
}
|
||||
}
|
||||
*dp++ = '\0';
|
||||
*dp = '\0';
|
||||
return (dp == string && def != NULL ? def : string);
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ flags_to_string(flags, def)
|
||||
setflags &= ~mapping[i].flag;
|
||||
}
|
||||
}
|
||||
*dp++ = '\0';
|
||||
*dp = '\0';
|
||||
return (dp == string && def != NULL ? def : string);
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ flags_to_string(flags, def)
|
||||
setflags &= ~mapping[i].flag;
|
||||
}
|
||||
}
|
||||
*dp++ = '\0';
|
||||
*dp = '\0';
|
||||
return (dp == string && def != NULL ? def : string);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user