Nikolay Sivov (@nsivov) commented about dlls/riched20/editor.c:
} case EM_SETPARAFORMAT: {
- BOOL result = editor_set_selection_para_fmt( editor, (PARAFORMAT2 *)lParam );
- BOOL result;
- PARAFORMAT2 fmt = *(PARAFORMAT2 *)lParam;
- fmt.cTabCount = max(0, min(fmt.cTabCount, 32)); /* Clamp between 0 and 32 */
- result = editor_set_selection_para_fmt(editor, &fmt);
I think this is would be better if done in para_set_fmt(). Instead of 32 please use MAX_TAB_STOPS or ARRAY_SIZE().