Commit 92dc6dc4 authored by claes's avatar claes

* not allowed as input for ProString

parent c19311ab
/*
* Proview $Id: wb_wnav.cpp,v 1.28 2005-11-17 09:05:10 claes Exp $
* Proview $Id: wb_wnav.cpp,v 1.29 2005-11-22 12:30:48 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -195,8 +195,16 @@ int wnav_attr_string_to_value( ldh_tSesContext ldhses, int type_id, char *value
}
case pwr_eType_Text:
case pwr_eType_String:
{
if ( (int) strlen( value_str) >= attr_size)
return WNAV__STRINGTOLONG;
strncpy( (char *)buffer_ptr, value_str, min(attr_size, buff_size));
break;
}
case pwr_eType_ProString:
{
if ( strchr( value_str, '*') != 0)
return WNAV__INPUT_SYNTAX;
if ( (int) strlen( value_str) >= attr_size)
return WNAV__STRINGTOLONG;
strncpy( (char *)buffer_ptr, value_str, min(attr_size, buff_size));
......
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