Skip to content

Commit

Permalink
ast: KeyMap did not recognise undef values when creating a KeyMap fro…
Browse files Browse the repository at this point in the history
…m a Channel
  • Loading branch information
David Berry committed Sep 17, 2012
1 parent 74af3fa commit 9baf578
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libraries/ast/keymap.c
Expand Up @@ -177,6 +177,9 @@ f - AST_MAPTYPE: Return the data type of a named entry in a map
* 14-JAN-2011 (DSB):
* Fix bug that prevented zero length strings being stored in a
* keymap.
* 17-SEP-2012 (DSB):
* Fix bug that prevented UNDEF entries from being read back in
* from a dump of a KeyMap.
*class--
*/

Expand Down Expand Up @@ -10314,6 +10317,10 @@ AstKeyMap *astLoadKeyMap_( void *mem, size_t size, AstKeyMapVtab *vtab,
alist = astFree( alist );
}

/* Undef values have no value. */
} else if( type == AST__UNDEFTYPE ) {
MapPutU( new, key, com, status );

/* Report an error if the data type is unknown. */
} else if( astOK ) {
astError( AST__BDFTS, "astLoadKeyMap(%s): Unknown data type code "
Expand Down

0 comments on commit 9baf578

Please sign in to comment.