Merge branch 'master' into blender2.8
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 7 May 2018 12:20:47 +0000 (14:20 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 7 May 2018 12:20:47 +0000 (14:20 +0200)
intern/ghost/intern/GHOST_DropTargetX11.cpp
source/blender/bmesh/tools/bmesh_bevel.c
source/blender/editors/sculpt_paint/sculpt.c

index 0efc8a78df5e9f8b4a61975aa51846efa112f486..30ab843c593b6beea9524587a24cbeaa47b97715 100644 (file)
@@ -192,7 +192,7 @@ void GHOST_DropTargetX11::UrlDecode(char *decodedOut, int bufferSize, const char
 
 char *GHOST_DropTargetX11::FileUrlDecode(char *fileUrl)
 {
-       if (strncpy(fileUrl, "file://", 7) != 0) {
+       if (strncmp(fileUrl, "file://", 7) == 0) {
                /* assume one character of encoded URL can be expanded to 4 chars max */
                int decodedSize = 4 * strlen(fileUrl) + 1;
                char *decodedPath = (char *)malloc(decodedSize);
index 457e74ce1aa020cadea1b308e4e983b113ae5501..ca96e5b4b7874522355d86335539fbb324a99566 100644 (file)
@@ -5403,7 +5403,7 @@ void BM_mesh_bevel(
                }
 
                /* Perhaps do a pass to try to even out widths */
-               if (!bp.vertex_only && bp.offset_adjust) {
+               if (!bp.vertex_only && bp.offset_adjust && bp.offset_type != BEVEL_AMT_PERCENT) {
                        adjust_offsets(&bp);
                }
 
index 9817ca4183242b700765d7d9a8119cb70b1e1d80..38fbb609283393a5c7274a29dd49bf66eb16a051 100644 (file)
@@ -1126,6 +1126,8 @@ static float brush_strength(
                                case BRUSH_MASK_SMOOTH:
                                        return alpha * pressure * feather;
                        }
+                       BLI_assert(!"Not supposed to happen");
+                       break;
 
                case SCULPT_TOOL_CREASE:
                case SCULPT_TOOL_BLOB: