As a result of this change, the basic_stringbuf constructor that
takes a mode ends up leaving hm_ set to 0, causing the comparison
"hm_ - str_.data() < noff" in seekoff() to succeed, which caused
the function to incorrectly return -1. The fix is to account for the
possibility of hm_ being 0 when computing the distance from hm_
to the start of the string.
Details
Details
Diff Detail
Diff Detail
- Build Status
Buildable 13295 Build 13295: arc lint + arc unit
Event Timeline
libcxx/include/sstream | ||
---|---|---|
580 | This can be const. |
Comment Actions
LGTM. I'm going to sprinkle const throughout this file later, but that is a drive-by thing.
All the lines that start out ptrdiff_t __hm = will soon be const ptrdiff_t __hm = ,
but that's not necessary for this bug fix.
This can be const.