aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/PostgresKit/Source/FLXPostgresError.m
diff options
context:
space:
mode:
Diffstat (limited to 'Frameworks/PostgresKit/Source/FLXPostgresError.m')
-rw-r--r--Frameworks/PostgresKit/Source/FLXPostgresError.m6
1 files changed, 2 insertions, 4 deletions
diff --git a/Frameworks/PostgresKit/Source/FLXPostgresError.m b/Frameworks/PostgresKit/Source/FLXPostgresError.m
index 6a0a6210..22394900 100644
--- a/Frameworks/PostgresKit/Source/FLXPostgresError.m
+++ b/Frameworks/PostgresKit/Source/FLXPostgresError.m
@@ -114,10 +114,8 @@
* @return A string representing the error value. The caller is responsible for freeing the associated memory.
*/
- (NSString *)_extractErrorField:(int)field fromResult:(PGresult *)result
-{
- const char *errorData = PQresultErrorField(result, field);
-
- return [[NSString alloc] initWithBytes:errorData length:strlen(errorData) encoding:NSUTF8StringEncoding];
+{
+ return [[NSString alloc] initWithUTF8String:PQresultErrorField(result, field)];
}
#pragma mark -