Fix bug where end > size was size > end, so always returned an error
update error codes in baseline vi and add update src