Changeset 256 for trunk/lib


Ignore:
Timestamp:
06/15/11 18:05:37 (13 years ago)
Author:
tim
Message:

switched to %XX encoding in command line tool output

fixed limitation with NULL/None/(default) value name lookups

corrected an nttime bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/regfi.c

    r255 r256  
    11901190    ? REGFI_ENCODING_ASCII : REGFI_ENCODING_UTF16LE;
    11911191
     1192  if(vk->name_length == 0)
     1193    return;
     1194
    11921195  if(from_encoding == output_encoding)
    11931196  {
     
    12801283  REGFI_ENCODING from_encoding = (nk->flags & REGFI_NK_FLAG_ASCIINAME)
    12811284    ? REGFI_ENCODING_ASCII : REGFI_ENCODING_UTF16LE;
    1282  
     1285
     1286  if(nk->name_length == 0)
     1287    return; 
     1288
    12831289  if(from_encoding == output_encoding)
    12841290  {
     
    23452351  bool found = false;
    23462352
    2347   /* XXX: cur->name can be NULL in the registry.
    2348    *      Should we allow for a way to search for that?
     2353  /* XXX: should we allow "(default)" subkey names?
     2354   *      Do realistically they exist?
    23492355   */
    23502356  if(name == NULL)
     
    23572363      return false;
    23582364
    2359     if((cur->name != NULL)
    2360       && (strcasecmp(cur->name, name) == 0))
     2365    /* A NULL name signifies the "(default)" value for a key */
     2366    if(cur->name != NULL && (strcasecmp(cur->name, name) == 0))
    23612367    {
    23622368      found = true;
     
    23822388  bool found = false;
    23832389
    2384   /* XXX: cur->name can be NULL in the registry. 
    2385    *      Should we allow for a way to search for that?
    2386    */
    2387   if(name == NULL)
    2388     return false;
    2389 
    23902390  for(i=0; (i < num_values) && (found == false); i++)
    23912391  {
     
    23942394      return false;
    23952395
    2396     if((cur->name != NULL)
    2397        && (strcasecmp(cur->name, name) == 0))
     2396    /* A NULL name signifies the "(default)" value for a key */
     2397    if(((name == NULL) && (cur->name == NULL))
     2398       || ((name != NULL) && (cur->name != NULL)
     2399           && (strcasecmp(cur->name, name) == 0)))
    23982400    {
    23992401      found = true;
Note: See TracChangeset for help on using the changeset viewer.