summaryrefslogtreecommitdiff
path: root/libvxi11client
diff options
context:
space:
mode:
Diffstat (limited to 'libvxi11client')
-rw-r--r--libvxi11client/perlbits/Client.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/libvxi11client/perlbits/Client.pm b/libvxi11client/perlbits/Client.pm
index df58e34..f4c76a4 100644
--- a/libvxi11client/perlbits/Client.pm
+++ b/libvxi11client/perlbits/Client.pm
@@ -68,7 +68,7 @@ sub vxi_read {
my ($bytes, $string, $reason) = vxi_read_long($self, $args{bufferlen}, $args{waitlock}, $args{termchrset},$args{termchr});
- if ($args{autochomp}) {
+ if (defined($string) && $args{autochomp}) {
chomp ($string);
}
@@ -89,7 +89,7 @@ sub vxi_docmd {
my ($ret, $dataout, $dataoutlen) = vxi_docmd_long($self, $args{datain}, $args{datainlen}, $args{dataoutbufferlen}, $args{waitlock});
- if ($args{autochomp}) {
+ if (defined($dataout) && $args{autochomp}) {
chomp ($dataout);
}