fix Issue 12580 - dup() won't accept void[]
Merge pull request #766 from MartinNowak/fix12580

fix Issue 12580 - dup() won't accept void[]