diff --git a/README.md b/README.md index fdddc9a..239e804 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ +[![CI](https://github.com/phranck/TUIKit/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/phranck/TUIKit/actions/workflows/ci.yml) +![Tests](https://img.shields.io/badge/Tests-181_passing-brightgreen) ![Swift 6.0](https://img.shields.io/badge/Swift-6.0-F05138?logo=swift&logoColor=white) ![macOS](https://img.shields.io/badge/Platform-macOS-000000?logo=apple&logoColor=white) ![Linux](https://img.shields.io/badge/Platform-Linux-FCC624?logo=linux&logoColor=black) -![License](https://img.shields.io/badge/License-MIT-blue) -![Tests](https://img.shields.io/badge/Tests-181_passing-brightgreen) +![License](https://img.shields.io/badge/License-CC--BY--NC--SA%204.0-lightgrey?style=flat) ![Spotnik - Terminal based Sptoify Player](.github/assets/spotnik_1.png) @@ -170,4 +171,4 @@ Tests/ ## License -MIT +This repository has been published under the [CC-BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/) license. diff --git a/Sources/TUIKit/Rendering/Terminal.swift b/Sources/TUIKit/Rendering/Terminal.swift index 5c48d03..e46b5ca 100644 --- a/Sources/TUIKit/Rendering/Terminal.swift +++ b/Sources/TUIKit/Rendering/Terminal.swift @@ -157,7 +157,7 @@ public final class Terminal: @unchecked Sendable { string.utf8CString.withUnsafeBufferPointer { buffer in // buffer includes null terminator — exclude it let count = buffer.count - 1 - guard count > 0 else { return } + guard count >= 1 else { return } buffer.baseAddress!.withMemoryRebound(to: UInt8.self, capacity: count) { pointer in var written = 0 while written < count {