Fix for handling changes introduced in postprocess - #135
Conversation
|
I don't get the change - if cAddr == TypedArrayElts(output_buffer), the copy will be idem-potent, so this does not change anything |
|
I'm a bit rusty with my C, so I can be wrong. I suspect that bug happens when you realloc memory for changed output and get pointer to the same memory address, but with bigger/smaller size of the allocated memory block. In that case If you want - I can write a plugin that triggers this behavior. |
|
Merged, thanks, and sorry for the (very) long delay. The pointer-equality guard indeed dropped in-place edits made by the postprocess callback. A regression test covering an in-place edit would be a welcome follow-up. |
Plugin postprocessing didn't introduce changes in files if string chain pointer didn't change. I removed additional check for that so HTTrack will now depend only on return value from plugin to apply changes.
Let me know if you need tests for this fix.