瀏覽代碼

[c] Fixed bug in AttachmentTimeline, wrong order of trinary operator expressions

badlogic 8 年之前
父節點
當前提交
37b6fe3c11
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      spine-c/src/spine/Animation.c

+ 1 - 1
spine-c/src/spine/Animation.c

@@ -611,7 +611,7 @@ void _spAttachmentTimeline_apply (const spTimeline* timeline, spSkeleton* skelet
 
 
 	if (mixingOut && setupPose) {
 	if (mixingOut && setupPose) {
 		const char* attachmentName = slot->data->attachmentName;
 		const char* attachmentName = slot->data->attachmentName;
-		spSlot_setAttachment(slot, attachmentName ? 0 : spSkeleton_getAttachmentForSlotIndex(skeleton, self->slotIndex, attachmentName));
+        spSlot_setAttachment(slot, attachmentName ? spSkeleton_getAttachmentForSlotIndex(skeleton, self->slotIndex, attachmentName) : 0);
 		return;
 		return;
 	}
 	}