Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ actual class DebugAntilog actual constructor(private val defaultTag: String) : A
private fun performTag(tag: String): String {
val thread = Thread.currentThread().stackTrace

return if (thread.size >= CALL_STACK_INDEX) {
return if (thread.size > CALL_STACK_INDEX) {
thread[CALL_STACK_INDEX].run {
"${createStackElementTag(className)}\$$methodName"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ actual class DebugAntilog(
// find stack trace
private fun performTag(tag: String): String {
val symbols = NSThread.callStackSymbols
if (symbols.size <= CALL_STACK_INDEX) return tag
if (symbols.lastIndex <= CALL_STACK_INDEX) return tag

return (symbols[CALL_STACK_INDEX] as? String)?.let {
createStackElementTag(it)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ actual class DebugAntilog(
private fun performTag(defaultTag: String): String {
val thread = Thread.currentThread().stackTrace

return if (thread.size >= CALL_STACK_INDEX) {
return if (thread.size > CALL_STACK_INDEX) {
thread[CALL_STACK_INDEX].run {
"${createStackElementTag(className)}\$$methodName"
}
Expand Down