summaryrefslogtreecommitdiff
path: root/plugins/dfinput
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-12-03 05:23:48 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-12-03 05:23:48 +0000
commitc057388716aadb2f7d5d20c12da29ce89396402b (patch)
tree99e47a577e94546858d5eb42c72c9e37972c9286 /plugins/dfinput
parentc9acd48b30eddf152325a9c0091e46d49439ae12 (diff)
Found another place that Xcode's static analyzer found. This one was saying that buf in PADpoll might be NULL, thus causing problems when using it as an array. I just got one test case, not all of them.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@72825 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins/dfinput')
-rw-r--r--plugins/dfinput/pad.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/dfinput/pad.c b/plugins/dfinput/pad.c
index ce5d7651..12251104 100644
--- a/plugins/dfinput/pad.c
+++ b/plugins/dfinput/pad.c
@@ -586,6 +586,7 @@ unsigned char PADpoll(unsigned char value) {
}
if (CurByte >= CmdLen) return 0;
+ if (buf == NULL) return 0;
return buf[CurByte++];
}