Skip to content

Commit 2dc74d0

Browse files
committed
Temporary fix: Add missing backslashes to REG_OPEN_LEGAL_OPTION
winsiderss/systeminformer#2187
1 parent 5f91ec6 commit 2dc74d0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

generate_docs.py

+10
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,16 @@ def split_header_to_chunks(path: Path) -> List[Chunk]:
341341
# Remove other stuff.
342342
code = code.replace('\n// Options\n\n//#define PHNT_NO_INLINE_INIT_STRING\n', '\n\n\n\n')
343343

344+
# Temporary fix.
345+
if path.name == 'ntregapi.h':
346+
code = code.replace(R'''#define REG_OPEN_LEGAL_OPTION
347+
(REG_OPTION_RESERVED | REG_OPTION_BACKUP_RESTORE |
348+
REG_OPTION_OPEN_LINK | REG_OPTION_DONT_VIRTUALIZE)
349+
''', R'''#define REG_OPEN_LEGAL_OPTION \
350+
(REG_OPTION_RESERVED | REG_OPTION_BACKUP_RESTORE | \
351+
REG_OPTION_OPEN_LINK | REG_OPTION_DONT_VIRTUALIZE)
352+
''')
353+
344354
# Add custom markers.
345355
code = re.sub(r'^// (begin|end)_', r'@\g<0>', code, flags=re.MULTILINE)
346356
code = re.sub(r'^#include <(pshpack\d+|poppack)\.h>$', r'@\g<0>', code, flags=re.MULTILINE)

0 commit comments

Comments
 (0)