diff options
Diffstat (limited to 'xdelta3/xdelta3-merge.h')
-rw-r--r-- | xdelta3/xdelta3-merge.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/xdelta3/xdelta3-merge.h b/xdelta3/xdelta3-merge.h index 8905643..434cf43 100644 --- a/xdelta3/xdelta3-merge.h +++ b/xdelta3/xdelta3-merge.h | |||
@@ -183,7 +183,9 @@ xd3_whole_append_inst (xd3_stream *stream, | |||
183 | } | 183 | } |
184 | else | 184 | else |
185 | { | 185 | { |
186 | winst->addr = stream->total_out + inst->addr - stream->dec_cpylen; | 186 | winst->addr = (stream->dec_winstart + |
187 | inst->addr - | ||
188 | stream->dec_cpylen); | ||
187 | } | 189 | } |
188 | break; | 190 | break; |
189 | } | 191 | } |
@@ -207,16 +209,16 @@ xd3_whole_append_window (xd3_stream *stream) | |||
207 | 209 | ||
208 | if ((stream->dec_current1.type != XD3_NOOP) && | 210 | if ((stream->dec_current1.type != XD3_NOOP) && |
209 | (ret = xd3_whole_append_inst (stream, | 211 | (ret = xd3_whole_append_inst (stream, |
210 | & stream->dec_current1))) | 212 | & stream->dec_current1))) |
211 | { | 213 | { |
212 | return ret; | 214 | return ret; |
213 | } | 215 | } |
214 | 216 | ||
215 | if ((stream->dec_current2.type != XD3_NOOP) && | 217 | if ((stream->dec_current2.type != XD3_NOOP) && |
216 | (ret = xd3_whole_append_inst (stream, | 218 | (ret = xd3_whole_append_inst (stream, |
217 | & stream->dec_current2))) | 219 | & stream->dec_current2))) |
218 | { | 220 | { |
219 | return ret; | 221 | return ret; |
220 | } | 222 | } |
221 | } | 223 | } |
222 | 224 | ||
@@ -317,8 +319,6 @@ xd3_merge_target_copy (xd3_stream *stream, | |||
317 | int ret; | 319 | int ret; |
318 | xd3_winst *oinst; | 320 | xd3_winst *oinst; |
319 | 321 | ||
320 | // TODO: this is totally untested | ||
321 | |||
322 | if ((ret = xd3_whole_alloc_winst (stream, &oinst))) | 322 | if ((ret = xd3_whole_alloc_winst (stream, &oinst))) |
323 | { | 323 | { |
324 | return ret; | 324 | return ret; |