X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fgdu.cpp;h=467ded2b2aa7b97d7968b9ee505c58746f163491;hb=3a9240aceaa70f89b0a6bba3769dc9a9c8f45f1b;hp=0d8efee1b87135c6ff17042d7741124a2f734aa2;hpb=8353663886b90d762d43790780be6cb58fb93c8a;p=yazpp-moved-to-github.git diff --git a/src/gdu.cpp b/src/gdu.cpp index 0d8efee..467ded2 100644 --- a/src/gdu.cpp +++ b/src/gdu.cpp @@ -1,8 +1,11 @@ /* This file is part of the yazpp toolkit. - * Copyright (C) 1998-2011 Index Data and Mike Taylor + * Copyright (C) 1998-2013 Index Data and Mike Taylor * See the file LICENSE for details. */ +#if HAVE_CONFIG_H +#include +#endif #include using namespace yazpp_1; @@ -39,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); }