[m-rev.] for review: fix bug in string.split_at_separator

Ralph Becket rafe at csse.unimelb.edu.au
Wed Jun 6 10:48:19 AEST 2007


Peter Wang, Tuesday,  5 June 2007:
> Estimated hours taken: 1
> Branches: main
> 
> library/string.m:
> 	Fix an off-by-one bug in string.split_at_separator.  The index in the
> 	initial call to split_at_separator2 was one past the end of the
> 	string, which worked in the C backends because strings are NUL
> 	terminated.
> 
> 	Rename split_at_separator2 to split_at_separator_2 and make it more
> 	readable.

That looks good.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list