virtualx-engine/servers
robfram 3cc2eee4e8 Fix crash in canvas_item_add_polyline when passing more points than colors
When `p_points.size() > p_colors.size()`, it crashed with invalid
array access to `p_colors`. Also, when `p_colors` was an empty
`Vector` it crashed due a missing `else` checking the `size`
condition, as the code handling that special case exists.

This PR fixes the missing `else` for `p_colors.size == 0` and,
following the `canvas_item_add_multiline` spirit, it only uses the
first color for the whole polyline if points and colors differ in
size.

Fix #17621.

(cherry picked from commit 8eedb2afe2)
2018-04-28 17:45:25 +02:00
..
arvr Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
audio Added pitch scale property to AudioStreamPlayer, AudioStreamPlayer2D and AudioStreamPlayer3D 2018-03-28 22:43:44 +02:00
physics Changed debug max distance to avoid overflow 2018-04-28 17:32:59 +02:00
physics_2d Clean up some bad words from code comments 2018-02-22 12:22:41 +01:00
visual Fix crash in canvas_item_add_polyline when passing more points than colors 2018-04-28 17:45:25 +02:00
arvr_server.cpp Remove a few debugging prints 2018-02-19 22:13:46 +01:00
arvr_server.h Fix typos with codespell 2018-02-22 12:17:06 +01:00
audio_server.cpp Fix possible crash when audio channels change 2018-04-14 21:47:05 +02:00
audio_server.h Fix possible crash when audio channels change 2018-04-14 21:47:05 +02:00
physics_2d_server.cpp Fix inconsistencies and typos in argument names 2018-02-04 20:10:13 +01:00
physics_2d_server.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
physics_server.cpp Deprecate a typo for a new method introduced in 3.0.1 2018-02-27 17:53:46 +01:00
physics_server.h Deprecate a typo for a new method introduced in 3.0.1 2018-02-27 17:53:46 +01:00
register_server_types.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
register_server_types.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
SCsub disable caching for targets using helper functions 2017-11-28 23:24:12 -04:00
server_wrap_mt_common.h Update copyright statements to 2018 2018-01-01 14:40:47 +01:00
visual_server.cpp Readd VS.sync and VS.draw to keep compatibility 2018-02-19 22:13:44 +01:00
visual_server.h Added all missing VisualServer bindings 2018-02-19 22:13:44 +01:00