Fix #3466: Crash happened when make some operation with decimal number in the Tab Size/Spaces field.#3487
Fix #3466: Crash happened when make some operation with decimal number in the Tab Size/Spaces field.#3487RaymondLim merged 1 commit intoadobe:masterfrom TomMalbran:tom/fix-issue-3466
Conversation
|
Even though this guards us against it, we should probably file a bug on CodeMirror too just to be a good citizen -- probably no client of CM would be happy with it going into an infinite loop when given a malformed tabs/spaces setting. |
|
Right, but the manual specifies that the indentUnit and the tabSize should be integers, so it seems more of our fault for providing a float to the option. I checked the CodeMirror code an neither of the options have a guard against bad values supplied to them. But if this seems that should be fixed in CodeMirror too, then we should add a bug there too. |
|
Yup, I think we want to take this fix. @RaymondLim - please merge this sprint. Thanks! |
|
I can't reproduce the infinite loop with a CodeMirror demo page. The only thing I can reproduce is the word "undefined" gets inserted at the beginning of the new line as indentation. Anyway, I will try to log one for this later. For now this Looks good and we can merge. |
Fix #3466: Crash happened when make some operation with decimal number in the Tab Size/Spaces field.
Fix for issue #3466 by not letting the unit be a float value, by making it an integer before saving it.