Commit 1d6e9ab9 authored by Pavel Vainerman's avatar Pavel Vainerman

(UniXML): исправил ошибку в функции getPIntProp() для отрицательных чисел и нуля.

parent 5131dc5a
......@@ -8,7 +8,7 @@
Name: libuniset
Version: 1.7
Release: alt15
Release: alt16
Summary: UniSet - library for building distributed industrial control systems
......@@ -335,6 +335,9 @@ mv -f %buildroot%python_sitelibdir_noarch/* %buildroot%python_sitelibdir/%oname
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
* Mon Oct 20 2014 Pavel Vainerman <pv@altlinux.ru> 1.7-alt16
- fixed bug in UniXML::iteartor getPIntProp() for prop <= 0
* Sun Jun 22 2014 Pavel Vainerman <pv@altlinux.ru> 1.7-alt15
- optimization: add insert-buffer for DBServer_MySQL (see uniset-docs)
......
......@@ -133,7 +133,7 @@ int UniXML::getIntProp(const xmlNode* node, const string name )
int UniXML::getPIntProp(const xmlNode* node, const string name, int def )
{
string param = getProp(node,name);
string param( getProp(node,name) );
if( param.empty() )
return def;
......@@ -407,10 +407,11 @@ int UniXML_iterator::getIntProp( const string name ) const
int UniXML_iterator::getPIntProp( const string name, int def ) const
{
int i = getIntProp(name);
if (i <= 0)
string param( getProp(name) );
if( param.empty() )
return def;
return i;
return UniSetTypes::uni_atoi(param);
}
// -------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment