]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/tmplout.c
Minor bug fix in ldap_parse_extended_result.
[openldap] / libraries / libldap / tmplout.c
index 38fa47015613c1022d91113d483d4b7a6590a876..e804fe0be74e32349653fd5b8fd69289caeea443 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <stdio.h>
 
+#include <ac/socket.h>
 #include <ac/stdlib.h>
 
 #include <ac/ctype.h>
@@ -909,11 +910,11 @@ time2text( char *ldtimestr, int dateonly )
                /* POSIX says tm_year should be year - 1900 */
        t.tm_year = 100 * GET2BYTENUM( p ) - 1900;
                p += 2;
-       t.tm_year = GET2BYTENUM( p ); p += 2;
+               t.tm_year += GET2BYTENUM( p ); p += 2;
 
        } else {
                /* came without a century */
-       t.tm_year = GET2BYTENUM( p ); p += 2;
+               t.tm_year = GET2BYTENUM( p ); p += 2;
 
                /* Y2K hack - 2 digit years < 70 are 21st century */
                if( t.tm_year < 70 ) {