mirror of
https://github.com/cc65/cc65.git
synced 2024-11-19 06:31:31 +00:00
Fixed an error in SB_Slice.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3770 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
bcd13b2dca
commit
6a9a5eeafc
@ -269,8 +269,9 @@ void SB_Slice (StrBuf* Target, const StrBuf* Source, unsigned Start, unsigned Le
|
||||
/* Target will be empty */
|
||||
SB_Clear (Target);
|
||||
return;
|
||||
} else if (Start + Len > Source->Len) {
|
||||
Len = (Start + Len) - Source->Len;
|
||||
}
|
||||
if (Start + Len > Source->Len) {
|
||||
Len = Source->Len - Start;
|
||||
}
|
||||
|
||||
/* Make sure we have enough room in the target string buffer */
|
||||
|
Loading…
Reference in New Issue
Block a user