Add validation for get_diff's result (fixes #478)
Merge pull request #509 from gintenlabo/fix-478

Add validation for get_diff's result (fixes #478)