access violation for array
Merge pull request #957 from huili2/fix_bug_invalid_reading

access violation for array to fix issue #949