Skip to content

Commit

Permalink
Space pointer was still pointing to the old string.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Oct 3, 2021
1 parent 6e82f6f commit 96f65f4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion magick/annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,15 +588,18 @@ static inline char *ReplaceSpaceWithNewline(char **caption,char *space)
*target;

size_t
length;
length,
offset;

length=strlen(*caption);
*space='\n';
offset=space-(*caption);
target=AcquireString(*caption);
CopyMagickString(target,*caption,space-(*caption)+2);
ConcatenateMagickString(target,space+octets,length);
(void) DestroyString(*caption);
*caption=target;
space=(*caption)+offset;
}
return(space);
}
Expand Down

0 comments on commit 96f65f4

Please sign in to comment.