X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;ds=sidebyside;f=src%2Fgdu.cpp;h=9c6f6dc391375f411310c7ddad6abb752ca468b4;hb=d62e0baee8ee3cccced41746ef09fc3e01f401d5;hp=231e8ef02f0073ed8a3d1fbc13fd3b307ded1d32;hpb=d1010e2fab0026b538230f67293bd5d4724c0913;p=yazpp-moved-to-github.git diff --git a/src/gdu.cpp b/src/gdu.cpp index 231e8ef..9c6f6dc 100644 --- a/src/gdu.cpp +++ b/src/gdu.cpp @@ -1,5 +1,5 @@ /* This file is part of the yazpp toolkit. - * Copyright (C) 1998-2011 Index Data and Mike Taylor + * Copyright (C) Index Data and Mike Taylor * See the file LICENSE for details. */ @@ -42,9 +42,10 @@ void GDU::base(Z_GDU *gdu, ODR encode) { int len; char *buf = odr_getbuf(encode, &len, 0); - + odr_setbuf(m_decode, buf, len, 0); - z_GDU(m_decode, &m_gdu, 0, 0); + if (!z_GDU(m_decode, &m_gdu, 0, 0)) + m_gdu = 0; } odr_destroy(encode); }