hidparser: fix pointer bug and missing declaration of i