From 001789d7337a5497a662427369ae9a178f717845 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 18 Jan 2018 14:49:09 +1100 Subject: [PATCH 1/8] Fix T53808: VSE doesn't show scene strip markers --- source/blender/blenkernel/intern/scene.c | 4 ++++ source/blender/blenkernel/intern/sequencer.c | 13 +++++++------ source/blender/blenloader/intern/readfile.c | 7 ++++++- source/blender/makesdna/DNA_scene_types.h | 3 ++- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 0baf611b293..126761ed14b 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -1139,6 +1139,10 @@ Object *BKE_scene_camera_find(Scene *sc) #ifdef DURIAN_CAMERA_SWITCH Object *BKE_scene_camera_switch_find(Scene *scene) { + if (scene->r.mode & R_NO_CAMERA_SWITCH) { + return NULL; + } + TimeMarker *m; int cfra = scene->r.cfra; int frame = -(MAXFRAME + 1); diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index b3db2080cb8..5066759f343 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -3199,11 +3199,12 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq int scemode; int cfra; float subframe; + #ifdef DURIAN_CAMERA_SWITCH - ListBase markers; + int mode; #endif } orig_data; - + /* Old info: * Hack! This function can be called from do_render_seq(), in that case * the seq->scene can already have a Render initialized with same name, @@ -3263,7 +3264,7 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq orig_data.cfra = scene->r.cfra; orig_data.subframe = scene->r.subframe; #ifdef DURIAN_CAMERA_SWITCH - orig_data.markers = scene->markers; + orig_data.mode = scene->r.mode; #endif BKE_scene_frame_set(scene, frame); @@ -3286,10 +3287,10 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq /* prevent eternal loop */ scene->r.scemode &= ~R_DOSEQ; - + #ifdef DURIAN_CAMERA_SWITCH /* stooping to new low's in hackyness :( */ - BLI_listbase_clear(&scene->markers); + scene->r.mode |= R_NO_CAMERA_SWITCH; #endif is_frame_update = (orig_data.cfra != scene->r.cfra) || (orig_data.subframe != scene->r.subframe); @@ -3409,7 +3410,7 @@ finally: #ifdef DURIAN_CAMERA_SWITCH /* stooping to new low's in hackyness :( */ - scene->markers = orig_data.markers; + scene->r.mode &= ~(orig_data.mode & R_NO_CAMERA_SWITCH); #endif return ibuf; diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 39f83062401..08830242279 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -6174,7 +6174,12 @@ static void direct_link_scene(FileData *fd, Scene *sce) } } } - + +#ifdef DURIAN_CAMERA_SWITCH + /* Runtime */ + sce->r.mode &= ~R_NO_CAMERA_SWITCH; +#endif + sce->r.avicodecdata = newdataadr(fd, sce->r.avicodecdata); if (sce->r.avicodecdata) { sce->r.avicodecdata->lpFormat = newdataadr(fd, sce->r.avicodecdata->lpFormat); diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 1ce94fb226f..1cc5cbf8c42 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1729,7 +1729,8 @@ typedef struct Scene { #define R_BORDER 0x0200 #define R_PANORAMA 0x0400 /* deprecated as scene option, still used in renderer */ #define R_CROP 0x0800 -/*#define R_COSMO 0x1000 deprecated */ + /* Disable camera switching: runtime (DURIAN_CAMERA_SWITCH) */ +#define R_NO_CAMERA_SWITCH 0x1000 #define R_ODDFIELD 0x2000 #define R_MBLUR 0x4000 /* unified was here */ From 98111509522a52e81eddbe26f7264d7ea228fb05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 18 Jan 2018 09:37:54 +0100 Subject: [PATCH 2/8] Improve docstring for mathutils.Matrix.decompose() --- source/blender/python/mathutils/mathutils_Matrix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c index 2578b19d5ec..29279d7dcb7 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.c +++ b/source/blender/python/mathutils/mathutils_Matrix.c @@ -1641,9 +1641,9 @@ static PyObject *Matrix_rotate(MatrixObject *self, PyObject *value) PyDoc_STRVAR(Matrix_decompose_doc, ".. method:: decompose()\n" "\n" -" Return the translation, rotation and scale components of this matrix.\n" +" Return the translation, rotation, and scale components of this matrix.\n" "\n" -" :return: trans, rot, scale triple.\n" +" :return: tuple of translation, rotation, and scale\n" " :rtype: (:class:`Vector`, :class:`Quaternion`, :class:`Vector`)" ); static PyObject *Matrix_decompose(MatrixObject *self) From 7b3e441bcf9e9ee27fd02a5f71216c8110cec80f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 18 Jan 2018 09:58:14 +0100 Subject: [PATCH 3/8] Improved docstring of mathutils.Matrix.lerp() --- source/blender/python/mathutils/mathutils_Matrix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c index 29279d7dcb7..924e46a8c00 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.c +++ b/source/blender/python/mathutils/mathutils_Matrix.c @@ -1680,7 +1680,8 @@ static PyObject *Matrix_decompose(MatrixObject *self) PyDoc_STRVAR(Matrix_lerp_doc, ".. function:: lerp(other, factor)\n" "\n" -" Returns the interpolation of two matrices.\n" +" Returns the interpolation of two matrices. Uses polar decomposition, see" +" \"Matrix Animation and Polar Decomposition\", Shoemake and Duff, 1992.\n" "\n" " :arg other: value to interpolate with.\n" " :type other: :class:`Matrix`\n" From 42a562496b506614c01f4df2589039f35a0fb536 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 18 Jan 2018 20:54:49 +1100 Subject: [PATCH 4/8] Fix memory leak in recent curve refactor 5b25605761fb7 --- source/blender/blenkernel/intern/curve.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 1a744ddaf03..d18fda632aa 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -2623,6 +2623,9 @@ void BKE_curve_bevelList_free(ListBase *bev) if (bl->segbevcount != NULL) { MEM_freeN(bl->segbevcount); } + if (bl->bevpoints != NULL) { + MEM_freeN(bl->bevpoints); + } MEM_freeN(bl); } From 2b9fb723edc2eba3f408c64b07291dc72434b680 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 19 Jan 2018 12:07:14 +1100 Subject: [PATCH 5/8] Fix T53832: Particle weight paint crash Drawing hair weights read before the hair array start. This code could be improved since it currently copy-pastes, from do_particle_interpolation, but this would need larger changes. For now just correct existing logic. --- source/blender/blenkernel/intern/particle.c | 28 +++++++++++++-------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index c0849e6bff4..ba75760c07a 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -2827,7 +2827,8 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf if (pset->brushtype == PE_BRUSH_WEIGHT) { pind.hkey[0] = NULL; /* pa != NULL since the weight brush is only available for hair */ - pind.hkey[1] = pa->hair; + pind.hkey[0] = pa->hair; + pind.hkey[1] = pa->hair + 1; } @@ -2885,12 +2886,26 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf /* selection coloring in edit mode */ if (pset->brushtype == PE_BRUSH_WEIGHT) { - float t2; - if (k == 0) { weight_to_rgb(ca->col, pind.hkey[1]->weight); } else { + /* warning: copied from 'do_particle_interpolation' (without 'mvert' array stepping) */ + float real_t; + if (result.time < 0.0f) { + real_t = -result.time; + } + else { + real_t = pind.hkey[0]->time + t * (pind.hkey[0][pa->totkey - 1].time - pind.hkey[0]->time); + } + + while (pind.hkey[1]->time < real_t) { + pind.hkey[1]++; + } + pind.hkey[0] = pind.hkey[1] - 1; + /* end copy */ + + float w1[3], w2[3]; keytime = (t - (*pind.ekey[0]->time)) / ((*pind.ekey[1]->time) - (*pind.ekey[0]->time)); @@ -2899,13 +2914,6 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf interp_v3_v3v3(ca->col, w1, w2, keytime); } - - /* at the moment this is only used for weight painting. - * will need to move out of this check if its used elsewhere. */ - t2 = birthtime + ((float)k / (float)segments) * (dietime - birthtime); - - while (pind.hkey[1]->time < t2) pind.hkey[1]++; - pind.hkey[0] = pind.hkey[1] - 1; } else { if ((ekey + (pind.ekey[0] - point->keys))->flag & PEK_SELECT) { From 368414efacc2b7260c02b0cb77a7b24c1e054f39 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 19 Jan 2018 12:25:09 +1100 Subject: [PATCH 6/8] Fix T53823: Particle weight brush crash Entering particle edit mode w/ the weight brush enabled crashed on non-hair particle systems. --- source/blender/blenkernel/intern/particle.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index ba75760c07a..26e7562590d 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -2794,7 +2794,9 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf /* frs_sec = (psys || edit->pid.flag & PTCACHE_VEL_PER_SEC) ? 25.0f : 1.0f; */ /* UNUSED */ - if (pset->brushtype == PE_BRUSH_WEIGHT) { + const bool use_weight = (pset->brushtype == PE_BRUSH_WEIGHT) && (psys != NULL) && (psys->particles != NULL); + + if (use_weight) { ; /* use weight painting colors now... */ } else { @@ -2824,7 +2826,7 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf /* should init_particle_interpolation set this ? */ - if (pset->brushtype == PE_BRUSH_WEIGHT) { + if (use_weight) { pind.hkey[0] = NULL; /* pa != NULL since the weight brush is only available for hair */ pind.hkey[0] = pa->hair; @@ -2885,7 +2887,7 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf } /* selection coloring in edit mode */ - if (pset->brushtype == PE_BRUSH_WEIGHT) { + if (use_weight) { if (k == 0) { weight_to_rgb(ca->col, pind.hkey[1]->weight); } From abb3a86e10fee210cdb47ceb15e1ad9cf1790209 Mon Sep 17 00:00:00 2001 From: Mai Lavelle Date: Thu, 18 Jan 2018 22:40:48 -0500 Subject: [PATCH 7/8] Fix T53833: Particle Info node and Displacement Crash The displacement shared was running before particle data was copied to the device causing bad memory access when the particle info node was used. Fix is simply to move particle update before mesh update so the data is available to displacement shaders. (Altho this fixes the crash the particle info node is still mostly useless with displacement for now...) --- intern/cycles/render/scene.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/intern/cycles/render/scene.cpp b/intern/cycles/render/scene.cpp index 09a69265de8..e34601a36a9 100644 --- a/intern/cycles/render/scene.cpp +++ b/intern/cycles/render/scene.cpp @@ -214,6 +214,11 @@ void Scene::device_update(Device *device_, Progress& progress) if(progress.get_cancel() || device->have_error()) return; + progress.set_status("Updating Particle Systems"); + particle_system_manager->device_update(device, &dscene, this, progress); + + if(progress.get_cancel() || device->have_error()) return; + progress.set_status("Updating Meshes"); mesh_manager->device_update(device, &dscene, this, progress); @@ -249,11 +254,6 @@ void Scene::device_update(Device *device_, Progress& progress) if(progress.get_cancel() || device->have_error()) return; - progress.set_status("Updating Particle Systems"); - particle_system_manager->device_update(device, &dscene, this, progress); - - if(progress.get_cancel() || device->have_error()) return; - progress.set_status("Updating Integrator"); integrator->device_update(device, &dscene, this); From 7a24e0d175827824d139f7627de2a5af34d687fb Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 19 Jan 2018 15:34:54 +1100 Subject: [PATCH 8/8] Cleanup: typos --- intern/cycles/kernel/kernel_path_state.h | 2 +- intern/cycles/kernel/kernel_random.h | 2 +- source/blender/blenkernel/BKE_world.h | 5 ++--- source/blender/blenlib/intern/bitmap_draw_2d.c | 2 +- source/blender/blenloader/intern/readfile.c | 2 +- source/blender/bmesh/tools/bmesh_bevel.c | 2 +- source/blender/editors/armature/pose_select.c | 2 +- source/blender/editors/render/render_preview.c | 2 +- source/blender/editors/space_image/image_ops.c | 7 ++++--- source/blender/editors/space_outliner/outliner_select.c | 4 ++-- source/blender/makesrna/intern/rna_access.c | 2 +- tests/gtests/blenlib/BLI_string_utf8_test.cc | 6 +++--- 12 files changed, 19 insertions(+), 19 deletions(-) diff --git a/intern/cycles/kernel/kernel_path_state.h b/intern/cycles/kernel/kernel_path_state.h index 505eed117e0..2ae866bb051 100644 --- a/intern/cycles/kernel/kernel_path_state.h +++ b/intern/cycles/kernel/kernel_path_state.h @@ -202,7 +202,7 @@ ccl_device_inline float path_state_continuation_probability(KernelGlobals *kg, #endif } - /* Probalistic termination: use sqrt() to roughly match typical view + /* Probabilistic termination: use sqrt() to roughly match typical view * transform and do path termination a bit later on average. */ return min(sqrtf(max3(fabs(throughput)) * state->branch_factor), 1.0f); } diff --git a/intern/cycles/kernel/kernel_random.h b/intern/cycles/kernel/kernel_random.h index 7a96806edac..efb9048beb8 100644 --- a/intern/cycles/kernel/kernel_random.h +++ b/intern/cycles/kernel/kernel_random.h @@ -20,7 +20,7 @@ CCL_NAMESPACE_BEGIN /* Pseudo random numbers, uncomment this for debugging correlations. Only run - * this single threaded on a CPU for repeatable resutls. */ + * this single threaded on a CPU for repeatable results. */ //#define __DEBUG_CORRELATION__ diff --git a/source/blender/blenkernel/BKE_world.h b/source/blender/blenkernel/BKE_world.h index dfa367afeb2..b28bac08727 100644 --- a/source/blender/blenkernel/BKE_world.h +++ b/source/blender/blenkernel/BKE_world.h @@ -38,11 +38,10 @@ struct World; void BKE_world_free(struct World *sc); void BKE_world_init(struct World *wrld); -struct World *BKE_world_add(struct Main *bmian, const char *name); +struct World *BKE_world_add(struct Main *bmain, const char *name); void BKE_world_copy_data(struct Main *bmain, struct World *wrld_dst, const struct World *wrld_src, const int flag); struct World *BKE_world_copy(struct Main *bmain, const struct World *wrld); struct World *BKE_world_localize(struct World *wrld); void BKE_world_make_local(struct Main *bmain, struct World *wrld, const bool lib_local); -#endif - +#endif /* __BKE_WORLD_H__ */ diff --git a/source/blender/blenlib/intern/bitmap_draw_2d.c b/source/blender/blenlib/intern/bitmap_draw_2d.c index e77e8cf40d0..fefd4b4587c 100644 --- a/source/blender/blenlib/intern/bitmap_draw_2d.c +++ b/source/blender/blenlib/intern/bitmap_draw_2d.c @@ -162,7 +162,7 @@ static int draw_poly_v2i_n__span_y_sort(const void *a_p, const void *b_p, void * } /** - * Draws a filled polyon with support for self intersections. + * Draws a filled polygon with support for self intersections. * * \param callback: Takes the x, y coords and x-span (\a x_end is not inclusive), * note that \a x_end will always be greater than \a x, so we can use: diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 08830242279..775eafb8fe2 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -9984,7 +9984,7 @@ static void give_base_to_objects(Main *mainvar, Scene *scene, View3D *v3d, Libra } if (flag & FILE_AUTOSELECT) { /* Note that link_object_postprocess() already checks for FILE_AUTOSELECT flag, - * but it will miss objects from non-instanciated groups... */ + * but it will miss objects from non-instantiated groups... */ ob->flag |= SELECT; /* do NOT make base active here! screws up GUI stuff, if you want it do it on src/ level */ } diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index a1fb13ecdfb..99384be0299 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -3198,7 +3198,7 @@ static void bevel_build_rings(BevelParams *bp, BMesh *bm, BevVert *bv) /* If we make a poly out of verts around bv, snapping to rep frep, will uv poly have zero area? * The uv poly is made by snapping all outside-of-frep vertices to the closest edge in frep. - * Assume that this funciton is called when the only inside-of-frep vertex is vm->boundstart. + * Assume that this function is called when the only inside-of-frep vertex is vm->boundstart. * The poly will have zero area if the distance of that first vertex to some edge e is zero, and all * the other vertices snap to e or snap to an edge at a point that is essentially on e too. */ static bool is_bad_uv_poly(BevVert *bv, BMFace *frep) diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c index 401f180385d..609944685d7 100644 --- a/source/blender/editors/armature/pose_select.c +++ b/source/blender/editors/armature/pose_select.c @@ -155,7 +155,7 @@ bool ED_do_pose_selectbuffer( * always give predictable behavior in weight paint mode - campbell */ if ((ob_act == NULL) || ((ob_act != ob) && (ob_act->mode & OB_MODE_WEIGHT_PAINT) == 0)) { /* when we are entering into posemode via toggle-select, - * frop another active object - always select the bone. */ + * from another active object - always select the bone. */ if (!extend && !deselect && toggle) { /* re-select below */ nearBone->flag &= ~BONE_SELECTED; diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index c2532ba033e..9656a57e2b7 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -637,7 +637,7 @@ void ED_preview_draw(const bContext *C, void *idp, void *parentp, void *slotp, r if (ok) *rect = newrect; - /* start a new preview render job if signalled through sbuts->preview, + /* start a new preview render job if signaled through sbuts->preview, * if no render result was found and no preview render job is running, * or if the job is running and the size of preview changed */ if ((sbuts != NULL && sbuts->preview) || diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 24db8ba40fd..9263dac5708 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1148,9 +1148,10 @@ static int image_cmp_frame(const void *a, const void *b) } /** - * \brief Return the start (offset) and the length of the sequence of continuous frames in the list of frames - * \param frames [in] the list of frame numbers, as a side-effect the list is sorted - * \param ofs [out] offest, the first frame number in the sequence + * Return the start (offset) and the length of the sequence of continuous frames in the list of frames + * + * \param frames: [in] the list of frame numbers, as a side-effect the list is sorted. + * \param ofs: [out] offset the first frame number in the sequence. * \return the number of contiguous frames in the sequence */ static int image_sequence_get_len(ListBase *frames, int *ofs) diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 9f79b575966..12b9d273a47 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -143,8 +143,8 @@ static eOLDrawState tree_element_active_renderlayer( /** * Select object tree: - * CTRL+LMB: Select/Deselect object and all cildren - * CTRL+SHIFT+LMB: Add/Remove object and all children + * CTRL+LMB: Select/Deselect object and all children. + * CTRL+SHIFT+LMB: Add/Remove object and all children. */ static void do_outliner_object_select_recursive(Scene *scene, Object *ob_parent, bool select) { diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 00566aed810..18e42488829 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -772,7 +772,7 @@ FunctionRNA *RNA_struct_find_function(StructRNA *srna, const char *identifier) } return NULL; - /* funcitonal but slow */ + /* functional but slow */ #else PointerRNA tptr; PropertyRNA *iterprop; diff --git a/tests/gtests/blenlib/BLI_string_utf8_test.cc b/tests/gtests/blenlib/BLI_string_utf8_test.cc index 95d73b4242f..30dbccc97fe 100644 --- a/tests/gtests/blenlib/BLI_string_utf8_test.cc +++ b/tests/gtests/blenlib/BLI_string_utf8_test.cc @@ -89,7 +89,7 @@ const char *utf8_invalid_tests[][3] = { // 3 Malformed sequences // 3.1 Unexpected continuation bytes -// Each unexpected continuation byte should be separately signalled as a malformed sequence of its own. +// Each unexpected continuation byte should be separately signaled as a malformed sequence of its own. {"3.1.1 First continuation byte 0x80: \"\x80\" |", "3.1.1 First continuation byte 0x80: \"\" |", "\x01"}, {"3.1.2 Last continuation byte 0xbf: \"\xbf\" |", @@ -130,7 +130,7 @@ const char *utf8_invalid_tests[][3] = { {"3.2.4 \"\xfc \xfd \" |", "3.2.4 \" \" |", "\x02"}, // 3.3 Sequences with last continuation byte missing -// All bytes of an incomplete sequence should be signalled as a single malformed sequence, +// All bytes of an incomplete sequence should be signaled as a single malformed sequence, // i.e., you should see only a single replacement character in each of the next 10 tests. // (Characters as in section 2) {"3.3.1 2-byte sequence with last byte missing (U+0000): \"\xc0\" |", @@ -154,7 +154,7 @@ const char *utf8_invalid_tests[][3] = { {"3.3.10 6-byte sequence with last byte missing (U-7FFFFFFF): \"\xfd\xbf\xbf\xbf\xbf\" |", "3.3.10 6-byte sequence with last byte missing (U-7FFFFFFF): \"\" |", "\x05"}, // 3.4 Concatenation of incomplete sequences -// All the 10 sequences of 3.3 concatenated, you should see 10 malformed sequences being signalled: +// All the 10 sequences of 3.3 concatenated, you should see 10 malformed sequences being signaled: {"3.4 \"\xc0\xe0\x80\xf0\x80\x80\xf8\x80\x80\x80\xfc\x80\x80\x80\x80" "\xdf\xef\xbf\xf7\xbf\xbf\xfb\xbf\xbf\xbf\xfd\xbf\xbf\xbf\xbf\"" " |",