diff options
author | Michael Meskes | 2009-05-27 14:16:51 +0000 |
---|---|---|
committer | Michael Meskes | 2009-05-27 14:16:51 +0000 |
commit | bd9ecd51a9905265406170aa258335437b7a268b (patch) | |
tree | acb49e5a2015504f0628a4465d1b17a6e4d0f8e2 | |
parent | 7fe8ca7a05ef04816b8eea0e43bf83e5b1c79b88 (diff) |
Reverting patch just in case a compiler treats this enum as signed.
-rw-r--r-- | src/interfaces/libpq/fe-exec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c index 5990fb7c1c..c1934ad643 100644 --- a/src/interfaces/libpq/fe-exec.c +++ b/src/interfaces/libpq/fe-exec.c @@ -2385,7 +2385,7 @@ PQresultStatus(const PGresult *res) char * PQresStatus(ExecStatusType status) { - if (status >= sizeof pgresStatus / sizeof pgresStatus[0]) + if (status < 0 || status >= sizeof pgresStatus / sizeof pgresStatus[0]) return libpq_gettext("invalid ExecStatusType code"); return pgresStatus[status]; } |