X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=perl-module%2FPSPP.xs;h=15d3b606cbecdab2aa76ae5324b347cc094e55fa;hb=3da49359c52cb783db907cc197847bbd5e721c97;hp=ca3f873ae110be68520c63a09c4f4601ca623c06;hpb=f550aee00a62fe1d8baf62d83cd7efef6cc2ee92;p=pspp diff --git a/perl-module/PSPP.xs b/perl-module/PSPP.xs index ca3f873ae1..15d3b606cb 100644 --- a/perl-module/PSPP.xs +++ b/perl-module/PSPP.xs @@ -654,10 +654,16 @@ CODE: if ( ifmt ) { struct substring ss = ss_cstr (SvPV_nolen (sv)); - if ( ! data_in (ss, LEGACY_NATIVE, ifmt->type, 0, 0, 0, - sfi->dict, - case_data_rw (c, v), - var_get_width (v)) ) + char *error; + bool ok; + + error = data_in (ss, LEGACY_NATIVE, ifmt->type, + case_data_rw (c, v), var_get_width (v), + dict_get_encoding (sfi->dict)); + ok = error == NULL; + free (error); + + if ( !ok ) { RETVAL = 0; goto finish;