- Timestamp:
- 06/15/11 18:05:37 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/regfi.c
r255 r256 1190 1190 ? REGFI_ENCODING_ASCII : REGFI_ENCODING_UTF16LE; 1191 1191 1192 if(vk->name_length == 0) 1193 return; 1194 1192 1195 if(from_encoding == output_encoding) 1193 1196 { … … 1280 1283 REGFI_ENCODING from_encoding = (nk->flags & REGFI_NK_FLAG_ASCIINAME) 1281 1284 ? REGFI_ENCODING_ASCII : REGFI_ENCODING_UTF16LE; 1282 1285 1286 if(nk->name_length == 0) 1287 return; 1288 1283 1289 if(from_encoding == output_encoding) 1284 1290 { … … 2345 2351 bool found = false; 2346 2352 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? 2349 2355 */ 2350 2356 if(name == NULL) … … 2357 2363 return false; 2358 2364 2359 if((cur->name != NULL)2360 2365 /* A NULL name signifies the "(default)" value for a key */ 2366 if(cur->name != NULL && (strcasecmp(cur->name, name) == 0)) 2361 2367 { 2362 2368 found = true; … … 2382 2388 bool found = false; 2383 2389 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 2390 2390 for(i=0; (i < num_values) && (found == false); i++) 2391 2391 { … … 2394 2394 return false; 2395 2395 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))) 2398 2400 { 2399 2401 found = true;
Note: See TracChangeset
for help on using the changeset viewer.