Skip to content

Commit

Permalink
ci: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
waitingsong committed Jun 21, 2024
1 parent 3c34c47 commit 32ca817
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/win32-api/src/util/user32/GetWindowTextW.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import assert from 'assert'

import { load, LibFns } from '##/lib/user32/index.js'
import { bufferToString } from 'win32-def'

import { load, LibFns } from '##/lib/user32/index.js'


const fnName: keyof LibFns = 'GetWindowTextW'
const fnAsyncName: keyof LibFns = 'GetWindowTextW_Async'
Expand Down Expand Up @@ -30,7 +31,7 @@ export async function GetWindowTextW(

const buf = Buffer.alloc(nMaxCount * 2)
const resLength = await fn(hWnd, buf, nMaxCount)
const len2 = Math.min(resLength, (nMaxCount - 1))
const len2 = Math.min(resLength, nMaxCount - 1)

const title = bufferToString(buf, len2)
return title ?? ''
Expand Down

0 comments on commit 32ca817

Please sign in to comment.