mtex-toolbox / mtex

MTEX is a free Matlab toolbox for quantitative texture analysis. Homepage:
http://mtex-toolbox.github.io/
GNU General Public License v2.0
278 stars 183 forks source link

fix rare crash #2022

Closed gsparks3 closed 8 months ago

gsparks3 commented 8 months ago

I managed to encounter a reproduceable situation where line 17 removed two entries from axesSize rather than one (as two of the three entries in cd were equal to the maximum value), which resulted in the following lines throwing an error after trying to access element 2 of axesSize. This change should ensure that line 17 only ever removes one element from axesSize.

kilir commented 8 months ago

Thank you for finding and fixing this bug.