s4: Fixed the int32 datatype support
[metze/samba/wip.git] / source4 / dsdb / samdb / ldb_modules / simple_ldap_map.c
index fe1de1c7d62796aaee9837033711b726b1751951..8fb639f53f10996be30407a8d1c7ad99c0cf4183 100644 (file)
@@ -147,7 +147,7 @@ static struct ldb_val objectCategory_always_dn(struct ldb_module *module, TALLOC
 static struct ldb_val normalise_to_signed32(struct ldb_module *module, TALLOC_CTX *ctx, const struct ldb_val *val)
 {
        struct ldb_val out;
-       int32_t i = (int32_t) strtol((char *)val->data, NULL, 0);
+       int32_t i = (int32_t) strtoll((char *)val->data, NULL, 0);
        out = data_blob_string_const(talloc_asprintf(ctx, "%d", i));
        return out;
 }