Don't check the same character twice in a row, check it and the next character.

Fixes Coverity CID 1260460.

Change-Id: Ic9ed109a863bcf20a5e67e4f52d628011f5e9ba5
Reviewed-on: https://code.wireshark.org/review/6087
Reviewed-by: Guy Harris <guy@alum.mit.edu>
(cherry picked from commit 120628e5f478a4ee767f87c2b408edb0ed5224ba)
Reviewed-on: https://code.wireshark.org/review/6088